faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

10 of 12 people (83%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How to submit a form when user closing the browser window?

Apr 6th, 2008 18:44
ha mo, Colin Fraser, koh hwee miin,


try..
<head>
<script>
function mySubmit()  {
   document.myForm.submit()
</script>
</head>
<body onUnload= "mySubmit()">
if the form is a mailto : 
<form name="myForm" action="mailto:[email protected]">
<input type="submit" name="mySubmit">
</form>
Of course, you could get information from the browser and send it to
yourself, this is pretty simple... but if you cannot work it out for
yourself, then try Joe Burn's JavaScript Primers at www.htmlgoodies.com
that will help
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com