Is there a way to close a window using javascript but without the prompt?
Mar 30, 2002, 8:39 AM
Veteran / Moderator (18436 posts)
Mar 30, 2002, 8:39 AM
Post #2 of 5
Views: 4311
See;
http://discuss.cgi101.com/cgi101/article.cgi?6714
For once I can tell you to search Google ;)
http://www.google.com/...ut+prompt+javascript
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
http://discuss.cgi101.com/cgi101/article.cgi?6714
For once I can tell you to search Google ;)
http://www.google.com/...ut+prompt+javascript
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Apr 1, 2002, 10:58 PM
Novice (11 posts)
Apr 1, 2002, 10:58 PM
Post #4 of 5
Views: 4217
Umm.... Maybe...
print "Location: javascript:window.close();\n\n";
Would this not do the job. Its what i use and i never get a prompt.
Hope it helps.
Doh! -. but thats on a pop up window only..
Drew
Code:
print "Location: javascript:window.close();\n\n";
Would this not do the job. Its what i use and i never get a prompt.
Hope it helps.
Doh! -. but thats on a pop up window only..
Drew
Last edited by:
ZimZangZoom: Apr 1, 2002, 11:13 PM
Apr 2, 2002, 12:49 AM
Novice (41 posts)
Apr 2, 2002, 12:49 AM
Post #5 of 5
Views: 4195
Paul, this should do the job for you.
But! To close a window without confirmation it must be opened from another window if the window the you trying to close is a new browser window ... the browser will always ask you for confirmation.
zaaron
---------
GetLokal Reviews
Code:
<a href="close" onClick="window.close(); return false;">Close Window</a>But! To close a window without confirmation it must be opened from another window if the window the you trying to close is a new browser window ... the browser will always ask you for confirmation.
zaaron
---------
GetLokal Reviews