|
|
A user asked me recently on the forums if it was possible to Submit an HTML form without the Submit button. She wanted to do it using a Hyperlink instead.
Well it is possible to submit the form using a hyperlink with a small amount of JavaScript code as shown here:
<html xmlns="http://www.w3.org/1999/xhtml">That’s all you need!
<head>
<title>Submit A HTML Form using a Hyperlink</title>
<script type="text/javascript">
function frmSubmit() {
document.form1.submit();
}
</script>
</head>
<body>
<form name="form1" method="post" action="somescript.pl" >
<div>
<a href="javascript:frmSubmit();">Submit</a>
</div>
</form>
</body>
'Like' us on our FaceBook page if you find this blog useful. Thanks!
Did you like this post?
|
|
|
||
|
|
|
|
Save on Delicious |
|
|
subscribe via rss |
|
subscribe via e-mail |
|
|
print this post |
|
follow me on twitter |





comments
1 Response to "Submit a HTML Form using a Hyperlink"I was trying it out on ASP.NET form and face error
Post a Comment