Thursday, December 29, 2011

submit is not a function, error in javascript

Was trying to figure out why i am having this error "submit is not a function" while trying to submit my form within the javascript method.

Spent half a day finally to realized that i have a button that is having the name "submit".
Once i rename it to "submit_btn" the form gets submitted successfully!

So i learned that dom elements should not be named as "submit" =D

Asian Parenting