spikesource hints'n'tips

Our Top Tags

                                       

Mailing List

Keep uptodate with the latest hints'n' tips as they are published by signing up to our mailing list.

Our RSS Feeds








Latest Linux News

Free Software in Education

Sunday, 24 May 2009
Free Software: "Free Software is political because it is strongly tied with a deep political question: that of education, and access to it."

A Great Multi-Platform Music Management Application: Jajuk

Sunday, 24 May 2009
Web Upd8: "Jajuk is a very comprehensive and feature rich Open Source music management software written in Java. The software program is therefore available for Windows, Linux and Apple Macintosh comp

Kiwi Imaging System - Forge your own operating system images in a matter of hours

Saturday, 23 May 2009
Dedoimedo: "Would you like to be able to create custom, ready-to-use operating system images that can be used as VMware images, Xen virtual machines or live DVDs or booted from USB sticks? Would you l

Linux Myth: No Simple, Easy Database Software

Saturday, 23 May 2009
The ERACC Web Log: "In this installment of my Linux Myth series I take aim at the GNU/Linux database nay-sayers, and shoot them down."

Finding the right open-source savvy lawyer

Saturday, 23 May 2009
Practical Technology: "Some days, like it or not, you need a lawyer. For most business purposes, picking the right law firm isn’t usually that big of a deal"

Latest Digg Entries

In my Javascript I keep getting "submit is not a function". What did I do?

posted Wednesday, 23 August 2006
If you have a Javascript function, doing some form validation for example, and at the end, it will submit the form, and it suddenly stops working, throwing up an error message in the console box that reads "submit is not a function" then you have probably mis-named one of your form fields.

The most common being that you've accidentally named a submit field as 'submit'.
<input type="submit" name="submit" value=" save ">
This is where the problem is.  When you make a call to submit the form using:
document.getElementById("aform").submit();
It will attempt to call the submit() function of the <input> field and not the <form> of the same name.

resolution inspired from http://www.spiration.co.uk/post/1232

tags:    

links: digg this    del.icio.us    technorati    




1. lsi left...
Saturday, 24 February 2007 12:16 pm

nice, solved my prob!


Related Posts

In my Javascript I keep getting "submit is not a function". What did I do?

Wednesday, 23 August 2006 10:57 A GMT
If you find you keep getting a javascript warning about "submit is not a function" and cannot figure out why then worry no more. Its a subtle issue.