Forums

This topic is locked

Close browser window upon submit

Posted 04 Mar 2003 17:19:02
1
has voted
04 Mar 2003 17:19:02 jack nimble posted:
How can I automatically have the browser window close if someone clicks on a submit button?

Replies

Replied 04 Mar 2003 17:39:09
04 Mar 2003 17:39:09 Martha Graham replied:
Try this:
<input type="button" value="close window" onClick="javascript:window.close()">

Martha Graham
Replied 04 Mar 2003 17:46:21
04 Mar 2003 17:46:21 jack nimble replied:
Great, thanks. I'll try that. But will that submit a form at the same time (or prior)? Is it possible to have a form submit at the same time?
Replied 05 Mar 2003 05:13:09
05 Mar 2003 05:13:09 Trey Wentz replied:
Just shooting from the hip so this might not work but try the above, but change the type to "submit".

<input type="submit" value="close window" onClick="javascript:window.close()">

-JustTrey
www.sitespins.com

"We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true."- Robert Wilensky

Edited by - JustTrey on 05 Mar 2003 05:13:52

Reply to this topic