Javascript Error: submit is not a function

If we have any button name with submit or with id submit.Then javascript form.submit will not work.

Let’s say i have a input text box
<input type=”submit” name=”submit” value=”Submit”>

and i want to submit my form through document.formname.submit(); then it won’t work because it gets confused with the same name of submit.So we must also keep some different name rather than reserved keywords.

Advertisements

About Kapil Chugh

In love with PHP and tweaking WordPress. Hungry for Open Source and new technologies. Honest. God-fearing. Happiest when solving problems.
This entry was posted in Javascript and tagged . Bookmark the permalink.

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