By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,039 Members | 1,035 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,039 IT Pros & Developers. It's quick & easy.

3 open windows - close 2 and change URL of 1st

P: n/a
The 1st window opens the 2nd window. The 2nd window opens the 3rd window.
From the 3rd window, how do I close the 3rd and 2nd windows then change the
URL of the 1st window? Thanks.
Jul 3 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I came up with this but still have problems. Please read below.

I am opening 3 windows. I name the 1st one "the1stone" with the script
below. This code is in the 1st window.

<script>
window.name="the1stone";
</script>

I open the 2nd window from the 1st window. Then I open a 3rd window from the
2nd window.

I then close the 3rd and 2nd windows and change the URL on the first window
with the code below. This code is in the 3rd window. It works fine in IE6.
Firefox and Netscape 8 closes the 3rd and 2nd windows but will not change
the URL in the 1st and remaining window. What can I do? Thanks.

<area target="the1stone" href="http://www.myurl.com" shape="rect"
coords="91, 108, 156, 132"
onclick="window.close(); opener.close()">
"Buddha Pest" <as*@qwerzxc.orgwrote in message
news:DS*****************@newsread1.news.pas.earthl ink.net...
The 1st window opens the 2nd window. The 2nd window opens the 3rd window.
From the 3rd window, how do I close the 3rd and 2nd windows then change
the URL of the 1st window? Thanks.

Jul 4 '06 #2

P: n/a
I was able to solve my problem with a timer (see below). This works in
Netscape 8, Firefox and IE6 as well.

<SCRIPT LANGUAGE="JavaScript">
<!--
function closethem() {
setTimeout('self.close(); opener.close()',200);
}
//-->
</SCRIPT>

<area target="the1stone" href="http://myurl.co"
shape="rect" coords="91, 108, 156, 132" onclick="javascript:closethem()">


"Buddha Pest" <as*@qwerzxc.orgwrote in message
news:XP****************@newsread2.news.pas.earthli nk.net...
>I came up with this but still have problems. Please read below.

I am opening 3 windows. I name the 1st one "the1stone" with the script
below. This code is in the 1st window.

<script>
window.name="the1stone";
</script>

I open the 2nd window from the 1st window. Then I open a 3rd window from
the 2nd window.

I then close the 3rd and 2nd windows and change the URL on the first
window with the code below. This code is in the 3rd window. It works fine
in IE6. Firefox and Netscape 8 closes the 3rd and 2nd windows but will not
change the URL in the 1st and remaining window. What can I do? Thanks.

<area target="the1stone" href="http://www.myurl.com" shape="rect"
coords="91, 108, 156, 132"
onclick="window.close(); opener.close()">
"Buddha Pest" <as*@qwerzxc.orgwrote in message
news:DS*****************@newsread1.news.pas.earthl ink.net...
>The 1st window opens the 2nd window. The 2nd window opens the 3rd window.
From the 3rd window, how do I close the 3rd and 2nd windows then change
the URL of the 1st window? Thanks.


Jul 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.