Joe's Java and Web Jottings

your host


Your Host

Calendar

««Nov 2009»»
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930

My Top Tags

               

Java Libs and Tools

My Other Pages

My RSS Feeds








important (javascript) safety tip...

posted Monday, 9 January 2006
If you expect to have to manipulate a form in javascript, don't name a submit button "submit".

tags:      




1. SOS left...
Monday, 9 January 2006 2:52 pm

This is a very good tip? Can you provide more detail?


2. Joe Shelby left...
Monday, 9 January 2006 3:02 pm

the reason? document.forms.submit() -- its the function to call to hava javascript do a submit, but if you have a form input element named submit, it replaces the submit property and () no longer is valid javascript.