Break out of iframe w/ Flash
- Started
- Last post
- 3 Responses
- lyrek
Does anyone know how to do this? I have an iframe in the middle of a page that calls a flash file from a different server. in that flash file is a GetURL command that goes like this:
on (release) {
getURL ("javascript:parent.frames.openN...
}I have tried to put the javascript that this command seeks in both the iframe and the iframe holder. When it's in both, an error occurs. When it's only in one, nothing occurs. It makes a clicking sound so it seems like something is working, but no window opens.
This is the Javascript:
It works fine without being in an iframe.
Please Help!!!
- lyrek0
sorry, this is the javascript:
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
- CAJTBr0
just talking off the top of my head, but doesn't parent.frames attempt to use the function from another frame on the same level as the iframe? if the function's in the parent frame, wouldn't you just use parent.openNewWindow...? (does parent definitely even apply to iframes?)
why not either:
a) include the function itself in the iframe, and just getURL("javascript:openNewWindow...
b) forget about the function completely and try doing it directly
getURL ("javascript:window.open('fileNa...
- lyrek0
The first option works only when the page is called directly, rather than clicked through an iframe.
The second option opens the pop-up when the page is called directly, but it changes the original page to a blank one that says [object] only.
it seems option A is closer to a solution, but it still doesn't work when clicked through an iframe.
:(Help!