September 17, 2005
Submitting a form using Javascript
It's sometimes necessary to submit a form using javascript rather than by using the normal serverside validation (or as well as). This is a handy example of how to do it...
HTML:
-
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
-
<title>Submit Form example from www.itamer.com/submit-form-using-javascript/192/</title>
-
<script>function submitMe()
-
{
-
alert('In submitMe()');
-
document.submitForm.submit();
-
return;
-
}
-
</script>
-
</meta>
-
</head>
-
<body bgcolor="#ffffff">
-
<form name="submitForm" action="selfsubmit.html" method="post">
-
<input type="hidden" value="page" name="whatever"/>
-
<input type="image" src="https://scgi.ebay.com/saw/pics/sitewide/processBar1_16x16.gif"/>
-
</form>
-
</body>
-
</html>
Also on this site
No Comments »
No comments yet.
Leave a comment
Search
Pages
Categories:
Recent Comments
- Stuar on NBO - National Business Online
- Serious Dilemma on Changing the page title using javascri…
- Aamir Shah on It's good to be a Rotten Apple
- Peter Hodge on Jobleader.co.nz - heard of them? heard…
- James on Domain registration changes we need!

