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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mouseout="window.close()"

Status
Not open for further replies.

johno5

IS-IT--Management
Aug 3, 2001
16
0
0
GB
Please help i'm using ASP to connect HTML to a DB.
1 HTML page shows a code another the codes definition.
I've set the 1st page onmouseover to open a new window and mouseout to close window, my problem is the mouseout shows a IE window 'the web pg u r viewing is trying t2 close the window do u want 2 close this window'. I DONT want this & seens its closes my browser & not my Popup its not to good.

This is my code PLEASE HELP i'm going mad!!!

<a onmouseover=&quot;window.open('eventcodes2.asp?VIEW=<%response.write rstemp(&quot;EVENT_CODE&quot;)%>',
'defwin','width=375,height=200')&quot; onmouseout=&quot;window.close()&quot;><%response.write rstemp(&quot;EVENT_CODE&quot;)%></a>
</B></h6></center></u></font></td>
 
Hi,

If I understand what you mean correctly then this problem is caused by the fact that you cannot close the parent IE window without the permission of the user. The only windows that you can close are child windows created and opened by the initial window(s).

Sorry to dissapoint :-(

cheers

Milage
 
window.close closes the CURRENT window
and as the current window in your case is the MAIN window you can't bypass the security warning
now, if you want to close the OPENED (popup) window, jsut do this :
<a onmouseover=&quot;mywin=window.open(...)&quot;
onmouseout=&quot;mywin.close()&quot;>
 
Turns out there is a solution.

It is about 15 threads down the page. I don't know how to link to it but I'm sure you'll find it. It is the one with 3 recommendations against it!

Cheers

Rob
 
>>milage
link to any thread like this:
thread 215-129143 but w/o space between thread & id

you can see the id in the top left corner of every thread (just under the subject) Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top