IE7 Breaks My Close Window Button

  • Thread starter Thread starter Vince
  • Start date Start date
V

Vince

Hello:

I posted this in the IE group some time ago with no response. Not sure if
this is a good place to post but hopefully someone will know how to fix
this.

In IE6 I use a close window form action on my website. It works just fine
when I call for the new page from either my java menu or from an image on my
page. However in IE7 when I use the action if called from an image but not
from the java menu when you try to close the window that opens you get an
alert that the website is trying to close the open window do you want to do
it?

This is the code I am using. I would appreciate it much if someone could
tell me how Ie7 has changed that would make you answer the question about
closing the window.

<table border="0" cellpadding="0" cellspacing="0" width="488">
<tr>
<td align="center" width="18">&nbsp;</td>
<td align="center" width="452"><form action="post"
name="clos">
<p align="center"><b><input type="button"
name="btnClos" value="Close Window"
onclick="window.close();"></b></p>
</form>
</td>
<td width="18">&nbsp;</td>
</tr>
</table>

Thanks
Vince
 
Try this:

<form>
<input type="button" value="Close Page" onclick="window.opener = self;
window.close()">
</form>



--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
Well it did not work.

From the best I can tell I need to change the way new windows open. They can
not open from standard text anymore they need to open from js for the close
button to work.

That may be more than what I am willing to put in. I may just remove the
buttons.

Vince
 
Back
Top