IE7 Breaks My Close Window Button

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
 
S

Steve Easton

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
 
V

Vince

Thanks Steve

Will give it a try and let you know how it goes. May be a day or two.

Vince
 
V

Vince

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top