Disable Submit on Enter

What are all these duplicate entries doing in the Admissions Request database? Hmm… there’s a pattern here – when there are duplicates or triplicates for the same person, the first one is always short, the second a bit more detailed, and the third or fourth is a complete entry. Aha! Some people get confused navigating web forms and hit Enter/Return rather than Tab to move to the next field. This should be solvable… Yep, there’s a simple JavaScript fix. Works nicely. In fact, this could be useful all over the place.

Rarely find “aftermarket” stuff I think should be built into the HTML specification, but this is a good example of such a case. It should be possible to put some kind of enter_submit="no" attribute into the form tag to save users from themselves. And developers shouldn’t have to code hacks around (and add byte-weight to pages on account of) common user errors such as this.

Update: Once again bitten by users running that infernal Norton Internet Security, which throws absurd and confusing warnings when it encounters javascript it doesn’t know about. Had to disable the work above — it’s more important that all people have access than that we avoid duplicate/partial entries.

Music: Sham 69 :: Borstal Breakout

Leave a Reply

Your email address will not be published.