by Thomas Beutel
...CONTEMPLATING CODE AND LIFE
...CONTEMPLATING CODE AND LIFE

Archive for the ‘javascript’ Category

Result of expression ‘document.forms[0].submit’ [[object HTMLInputElement]] is not a function.

Tuesday, September 15th, 2009 Posted in Programming, jQuery, javascript | Comments

I was trying to add a small delay into my form submission like so: <form ... onsubmit="setTimeout('document.forms[0].submit()',2000);return false;"> but everytime I tried it, I got the following error: Result of expression 'document.forms[0].submit' [[object HTMLInputElement]] is not a function. This one had me stumped, until ...