Thursday, September 4, 2008
JavaScript : form.submit is not a function
I was just trying to submit an HTML form using document.formname.submit() method and was getting these error on different browser.
document.formname.submit is not a function
Uncaught TypeError: Property 'submit' of object #HTMLForm element is not a function
Thats weird! It worked all the time. I was clueless why JavaScript would behave like this...?
Yeah, that was a silly mistake. I didn't realize that I named the submit button as 'submit' and that why javascript is failing. We may do this kind of mistakes every now and then...
Subscribe to:
Post Comments (Atom)
8 comments:
Not only you make silly mistakes. Thanks!
great, silly mistake
a href="document.form1.submit()"
input type="submit" name="submit"
above code wont work because there are more than one submit so make sure you dont name your input same as default/native submit();
thanks again
wow... I have been banging my head with this error for 3 days.
Thank you so much!
Thank you very much! i would've never seen that, saved me a lot of time :)
Thanks You have find out atlast...
Its was simple mistak, But Its complex to decode.. Great Job !!!!
THANKS A LOT!!! :)
Thank you, man!
Thanks a lot dude :-) That saved my time :-)
Post a Comment