...

View Full Version : frames, popup & flash



quiquedcode
06-27-2004, 03:02 AM
Hi ppl
I have the main site default.php with lot of frames.

one frame is named corner, which contains a text link
one frame is named flash, which contains a button in flash

both, the text link and the flash button open THE SAME POPUP

There's another text link in the popup which calls this JS function
openinparent('web.htm')

function openinparent(website){
window.opener.window.top.frames.corner.location=website;
}

When i open the popup from flash button and click the link (that is in the popup website) the web.htm does not change in the corner frame, but when i open the popup from the text link frame, it does.

any ideas?

thanks alot

quiquedcode
06-27-2004, 08:36 PM
U can look @ the picture posted...
the flash button is located in a frame called flash
the text link is located in the frame called corner
both, the button & the text link open the popup...

then, when i click the link in the popup, the contents of the corner frame must change, but the link in the popup only works when it is opened from text link...

i'm astonished of this behaviour...

jamescover
06-27-2004, 09:11 PM
When i open the popup from flash button and click the link (that is in the popup website) the web.htm does not change in the corner frame, but when i open the popup from the text link frame, it does.


How about posting your text and flash code, and the code that opens the popup....


-james

quiquedcode
06-27-2004, 09:37 PM
the code for the text link:

function openpopup(){
MM_openBrWindow('popup.htm','popup','toolbar=not,location=not,status=not,scrollbars=yes,resizable=ye s,width=700,height=550');
}

the actionscript code for the flash button

on(release){
getURL('javascript:openpopup()');
}

both code works gr8 to open the popup...
then, in the popup... i have a text link with this code



<a href="location1.php" onClick="openinparentframe('web.htm')">Click HERE</a>

and the JS function is

function openinparentframe(website){
window.opener.window.top.frames.corner.location=website;
}


well, when i open the popup from flash, the corner frame does not change its contents when i click the link in the popup... but when i open the popup from the text link, it works...

:(

glenngv
06-28-2004, 04:14 AM
It might be the opener property is null or something when the popup is opened by Flash ActionScript.

Try this instead:

function openinparentframe(website){
window.open(website, "corner");
}

quiquedcode
06-28-2004, 04:38 AM
It is incredible...
glenngv, I thought your solution would be even easier !!
I had the hope it'd work, but it didnt...
Very strange... :(

glenngv
06-28-2004, 05:41 AM
What happened? It opened in a new window instead?

Is the frame really named "corner" (all lowercase)?

quiquedcode
06-28-2004, 05:49 AM
no m8...
it didn't opened a new window...
after I changed the code in the JS function to window.open(website,"corner"); ... I opened the popup from the text link, i clicked the link in the popup and the content of the corner frame changed, nice..
When i opened the same popup from flash, i clicked the link in the popup, but the content didn't change in corner frame.
I always check lowercase, etc. in my code... and yes, the frame is called corner... ;)
If it were not not 'corner', it should not change the contents when opened the popup from the text link ... ;)

I think that flash opens the popup like if it were a new window... and no relation is made between the popup and the parent window... :confused:

glenngv
06-28-2004, 06:22 AM
It's weird. It shouldn't matter if the popup window is opened by the flash. It should work as long as the "corner" frame exists. If it didn't exist, it should open a new window which didn't happen to you. Probably it encountered a js error, please check it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum