Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javascript submit() is not a function? [duplicate]

Tags:

Possible Duplicate:
submit is not a function in javascript

Why is the following basic javascript function giving me an error document.getElementById("form").submit is not a function.

The only thing i have on a page is a form and this javascript function. I want he form to auto submit when page is accessed.

<script>  window.onload = function(){  document.getElementById('form').submit(); } </script> 
like image 747
Pinkie Avatar asked Jun 29 '11 18:06

Pinkie


1 Answers

Make sure that there is no name="submit" or id="submit" in the form

like image 200
Naftali Avatar answered Sep 18 '22 23:09

Naftali