PDA

View Full Version : Closing a certain pop-up window


mfenoglio
03-09-2006, 05:07 PM
I've been looking for days for a way to do this and couldn't do it, so I've decided to post my specific problem.
Here is what I want to do: close a certain pop-up window that my site opened, FROM the page that opened it (without closing this one). All this from a Flash movie of course.
Here is how I'm opening the pop-up window (I have no problem opening the window):
In flash button:

on (release) {
getURL("JavaScript: pop('pops/west.htm','detail','width=600,height=400,toolbar=n o,scrollbars=no, resize=no')");
}

In html page:
<head>
<Script language="JavaScript">
function pop(URLtoOpen,windowName,windowFeatures) {
window.open(URLtoOpen,windowName,windowFeatures);
}
</Script>
<title>

I've read I should use the window.close() function, but can`t get it to work. Let's say my popup window name is "detail". Function "detail.close()" won't work... I've tried everything.
Could someone tell me how to do it? What's the code for the flash button and what code should I include in the html?
Thanks!

Cota
03-09-2006, 05:19 PM
read this one
http://www.actionscript.org/forums/showthread.php3?t=99362

mfenoglio
03-09-2006, 10:03 PM
I did read that post already, didn't help though. Can anyone help?

mfenoglio
03-09-2006, 10:15 PM
What I want to do is close the sub window (popup) from the main window.

Cota
03-10-2006, 01:07 AM
are you testing locally or online?

mfenoglio
03-10-2006, 11:01 AM
are you testing locally or online?
I'm testing everything online.

Cota
03-10-2006, 01:20 PM
I'm taking a guess at this point, but have you tried window.detail.close()

mfenoglio
03-13-2006, 02:19 PM
Unfortunatly I've tried that already. Still won't work... any ideas?
Thanks!

Cota
03-13-2006, 02:45 PM
I'm out of ideas....