...

View Full Version : More Popup's



Dingbat
06-12-2003, 01:54 PM
Hi Guys,

I have a popup when the site is first loaded. In the popup there is a link to open another popup.

My problem. From the second popup how do I close both popup's and at the same time load another page into the main window?

Regards,

The Dingbat :(

Mr J
06-12-2003, 04:46 PM
Which window do you want to close the popups from?

Dingbat
06-13-2003, 01:02 PM
Maybe I should have explained in a little more detail.

The first page is contained in a frame with an auto popup when the site is first opened. The popup is set to open once only. In the first popup there is a link to open a second popup with some more info.

My need is to close both popups and to load a form into the main frame window.

All assistance is greatly appreciated.

The Dingbat :confused: :confused:

Mr J
06-13-2003, 04:45 PM
The scripts are slightly different depending on which popup you are going to include the link in to close the popups and load into your mainframe.


Close both popups and load into mainframe from first popup.

In the first popup

<script>
function close_me(){
opener.parent.main.location="page4.htm"
opener.close()
self.close()
popup2.close()
}
</script>


<a href="#null" onclick="win2=window.open('popup2.htm','win','height=300,width=300,top=100,left=400')">Open Popup2</a>

<a href="#null" onclick="close_me()">Close All</a>

[/SIZE=1]
Close both popups and load into mainframe from second popup.

In the second popup.
[SIZE=1]
<script>
function close_me(){
opener.opener.parent.main.location="page4.htm"
opener.close()
self.close()
}
</script>

<a href="#null" onclick="close_me()">Close All</a>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum