|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
window.opener javascript
I have a page that uses javascript to open another window. I want the 2nd window to close the 1st. I know that I can refer to the 1st window using window.opener but I am quite inexperienced. Can anyone show me the syntax to close the 1st window.
BTW, I know that if I wanted I could close the 1st window after a certain amount of time and achieve the same effect but, honestly, I would like to know how to use window.opener. |
|
#2
|
|||
|
|||
|
RE: window.opener javascript
that would be simply:
window.opener.close(); however, if the opener is not a generated window, you will recieve a warning. This warning can be circumvented (not in IE5.0 though), but I'm not the one to tell you how since I don't like such practices, and therefor don't want to see this knowledge spread... |
|
#3
|
|||
|
|||
|
RE: window.opener javascript
Thanks for your help. It worked but some MSN users (and I suspcet AOL users) seem to still have the screen I attempted to close. I would like to try to use the setTimeout command to close the 1st window now.
Can you tell me how? |
|
#4
|
|||
|
|||
|
RE: RE: window.opener javascript
Quote:
sure, for this once: setTimeout('window.opener.close()', 1000); (the 1000 is the timeout in milliseconds) for more on javascript, try the references and guides @ http://devedge.netscape.com/central/javascript/ |
|
#5
|
|||
|
|||
|
RE: window.opener javascript
Thanks for your help and the link.
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > window.opener javascript |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|