Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing window without IE 5.x error message

Status
Not open for further replies.

I12BPhil

Technical User
Aug 7, 2000
1
US
I'm using Javascript 1.2<br><br>I'm trying to get IE 5.x to close a parent window by using window.close('name.html') after an openwindow script. It runs fine on the Mac, but on Windows it gives a message: &quot;The webpage you are viewing is trying to close the window. Do you want to close the window?&quot;<br><br>I've tried moving the Javascript into the child (popup) window but it closes the child instead of the previous window, even though the object name is the parent window.<br><br>How do I get around this?
 
You can't close a window unless it's been opened from JavaScript (I'm pretty sure that's how it goes). So... open it from JavaScript, and that solves your problem (I think... or, I hope). <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
Checkout this tread titled:

&quot;trying to close window w/o IE message&quot;

thread216-595783
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top