Vintage radio [Image courtesy of sippakorn at FreeDigitalPhotos.net]

My boss (bless his little cotton socks) wanted me to implement some code that submitted a form when the user changed the selection in a set of radio buttons.

This seemed fairly simple: surely I could just do something like:

Apparently not. Firebug kept reporting the error: submit is not a function. (Despite the fact that I know it darn well is)

After writing a separate function and calling it on the onClick method, and after trying different syntax to refer to the form, and after reading countless forums on how to get this right…

Solution: rename your submit button – or even (as Javascript is case-sensitive) – call your button "Submit”.

I mean: which idiot calls their submit button “submit” anyways…

Leave a Reply