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!

Open/Close window

Status
Not open for further replies.

GaryC123

Programmer
Sep 10, 2002
1,041
NO
I have the following script opening a new window and closing the old one but is there anyway to get rid of the msg box saying the window is trying to close?

<Script LANGUAGE=&quot;JavaScript&quot;>
window.open(&quot; &quot;hotel_update&quot;, &quot;Status=yes, Toolbar=yes, Menubar=yes&quot;, &quot;width&quot;, &quot;height&quot;)
window.close();
</Script> Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Just a small trick :)

<Script LANGUAGE=&quot;JavaScript&quot;>
var wid=window.open(.........);
window.opener=wid;
window.close();
</script>

Regards,
Sergey Smirnov
Ask me directly at
 
<script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
function closewin()
{
self.close();
}
</script>
</head>
<body>
<input type=&quot;button&quot; value=&quot;close&quot; onClick=&quot;closewin();&quot;>

==========================================================
Heres how I do it . . . hope that helps!

Code One
 
Only self.close() does not help to avoid msg box if user uses Internet Explorer. It works fine in Netscape 6.* and Opera 6.*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top