Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
Slashdot Deals: Prep for the CompTIA A+ certification exam. Save 95% on the CompTIA IT Certification Bundle ×
User Journal

Journal ynotds's Journal: Don't ever call submit submit

This really should have been a headline item in HTML 101 but it is surprisingly difficult to find a quick explanation of the non-obvious diagnostics which eventually led me to a relatively simple problem.

When there is a namespace clash in JavaScript, properties outrank methods.

When you name a submit button, that name becomes a property of the containing form. Assuming the containing form tag says name='myformname', the very useful document.myformname.submit() method becomes unreachable.

And the obvious answer, changing the form name, becomes impossible to contemplate when your main client's business-defining intranet is built on middleware which calls every submit button submit so that progress through a process is represented by values of $in{'submit'}.

I've even relatively recently added code which logs $in{'submit'} along with other details of every process that is run so we can learn more about actual usage patterns.

This discussion has been archived. No new comments can be posted.

Don't ever call submit submit

Comments Filter:

What is now proved was once only imagin'd. -- William Blake

Working...