I have a small JS code that submit the form.
[FONT=”Courier New”][SIZE=”1″]<html>
<head>
<title>test</title>
<script language=”javascript”>
function validate() {
document.myform.submit();
}
</script>
</head>
<body>
<?php
$Fname = $_POST[“Fname”];
$Lname = $
$Title = $_GET[“title”];
echo “$Title $Fname $Lname <p>”;
?>
<form method=”post” name=”myform” action=”<?php echo $PHP_SELF . “?title=Mr.”;?>”>
First Name:<input type=”text” size=”12″ maxlength=”12″ name=”Fname”><br />
Last Name:<input type=”text” size=”12″ maxlength=”36″ name=”Lname”><br />
<input type=”submit” value=”submit” name=”submit”>
<a href=”javascript:validate();”>Submit</a>
</form></body>
</html>
When I click the Submit link, FireFox tells me that document.myform.submit(); is not a function. What did I do wrong?