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!

Close a window WITHOUT using Javascript

Status
Not open for further replies.

DrDrew

Programmer
Jun 24, 2002
8
US
I am creating a web page that will close when a user clicks on a "submit" button that has "window.close()" set as the "onSubmit" event. Unfortunately, if a person has Javascript turned off on their web browser, then the "window.close()" event will not work. Does anyone have any alternatives using VBScript or some other language that will work to close a window in case Javascript is turned off?
 
um, if the user has scripting turned off, then how are you going to use some other SCRIPT to close the window? ;-)



=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff
 
In some later versions of Netscape (I have not used the newest version) the user has the option of turning off just Javascript (not all Active Scripting). I guess a better way to phrase my question would be is there a way to close a window when Active Scripting is turned off on the Client side (i.e. = in the user's web browser)?
 
well, if javascript only is turned off, the only other option i know of would be vbscript, but vbscript only works in IE.

<script type=&quot;text/vbscript&quot;>
window.close()
</script>

if all scripting is turned off, i think you're out of luck.



=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff
 
jemminger,

Isn't VBScript turned off too when Javacript is turned off?

All,

Clicking the little X on the upper right might be the only way.

Gary Haran
********************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top