Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
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:

Children begin by loving their parents. After a time they judge them. Rarely, if ever, do they forgive them. - Oscar Wilde

Working...