当我发布一个表单提交表单我得到不能调用方法“提交”的null

When i post a form the submit a form i get cannot call method "submit" of null but i dont know why it wont post. I set the idstatus with jquery. But the variable wont be posted somehow.

<form name="myform" id="myform" action="<?php echo base_url() ?>/agenda.php/index/" method="post">
  <input type="text" name="id" id="idstatus" class="text ui-widget-content ui-corner-all">
  <input type="submit" onclick="document.getElementById('myform').submit();" value="See more" />
</form>
<form name="myform" id="myform" action="<?php echo base_url() ?>/agenda.php/index/" method="post">
  <input type="text" name="id" id="idstatus" class="text ui-widget-content ui-corner-all">
  <input type="submit" value="See more" />
</form>
<!DOCTYPE html>
<html>
<body>

<p>Enter some text in the fields below, then press the "Submit form" button to submit the form.</p>

<form id="myForm" action="<?php echo base_url() ?>/agenda.php/index/" method="post">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br><br>
<input type="button" onclick="myFunction()" value="Submit form">
</form>

<script>
function myFunction()
{
document.getElementById("myForm").submit();
}
</script>

</body>
</html>  

Make a seperate function , it will work.