Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
User Journal

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

Journal by ynotds

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:

Round Numbers are always false. -- Samuel Johnson

Working...