[jQuery] Submit a form via function call
Why won't the code below submit the form?
I want to submit the page using links, buttons, etc.
Is this even possible?
-----------
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title></title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function dosubmit() {
$("myform").submit();
}
</script>
</head>
<body>
<form method="post" action="test.php" id="myform">
<input type="button" id="button" onclick="dosubmit()" value="click me">
<input type="hidden" name="submit" value="1">
</form>
<pre>
<?php
print_r($_POST);
?>
</pre>
</body>
</html>
--
View this message in context: http://www.nabble.com/Submit-a-form-via-function-call-tp14948064s27240p14948064.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.