What to do when you get this: “JavaScript : form.submit is not a function”

Check out this little gem I found here:

http://eee94180.blogspot.com/2008/09/javascript-formsubmit-is-not-function.html

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…
Advertisements

~ by WPA Staff on July 26, 2012.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: