RE: Suppressing carriage return in a form action??

by Klaas De Waele <klaas(at)gracegraphics.be>

 Date:  Wed, 4 Jul 2001 10:16:01 +0200
 To:  "'Berk/Devlin'" <armadill(at)earthlink.net>,
"'hwg-techniques(at)mail.hwg.org'" <hwg-techniques(at)mail.hwg.org>
  todo: View Thread, Original
I think this is all a bit bending to the wrong habits of users.  Internet
users should know that by pressing enter they submit a form, and by pressing
tab they can cycle through the fields, while when pressing backspace it
could very well be they will be taken to a previously visited page.

I don't think it's considered our job to break functions.  There's some
things that I find annoying on sites:

in order of "annoyingness"

- popups when you enter/leave a page
- right-mouse button disabled (don't worry, I'll get to the code another
way)
- sound (well... noise)
- bad navigation
- being forced to grab the mouse after typing something (forms not
submitting when I press enter, etc...)
-...

Maybe I'll once write a book about annoying websites.
Please inform me if you have an annoying site.


- Kayjey -



-----Oorspronkelijk bericht-----
Van: owner-hwg-techniques(at)hwg.org
[mailto:owner-hwg-techniques(at)hwg.org]Namens Berk/Devlin
Verzonden: woensdag 4 juli 2001 3:42
Aan: hwg-techniques(at)mail.hwg.org
Onderwerp: Re: Suppressing carriage return in a form action??


On Wed, 13 Jun 2001 10:05:28 -0700, I asked:

>I have a form (http://armadillosoft.com/epgy/join.php3) and my users are
accidentally submitting it prematurely by pressing <ENTER> to go to the next
field when they should be pressing tab.  
>
>Is there some way in HTML that I can convert the <ENTER> key to a tab or at
least suppress it unless the user is pointing to my SUBMIT button?

The helpful suggestions I received from hwg-techniques mostly involved using
JavaScript and I wanted the fix I implemented to work regardless of whether
JavaScript was turned on.  (And, also, I don't actually want to validate
every field, because they are free to not fill out every field.)  

So, I decided to make this work as follows:

1.  First form comes up.  (Form warns users to not press Enter unless they
really want to submit...)  User can enter stuff and then user submits it.
2.  Confirmation form comes up.  (Form warns users to not press Enter unless
they really want to submit.)  User can enter/change any field.  User submits
it.
3.  Email is forwarded to me.

Obviously, it's not perfect.  But it's server-side, gives warning about
Enter vs. Tab, and users get an extra chance to add/edit fields before form
goes in.  Anyway, worst that happens is incomplete form is submitted.  No
one dies if the form gets submitted prematurely, but now, hopefully fewer
will be submitted prematurely.

So, now I've got a slew of different forms, all of which (hopefully) work
similarly.  They are at:
http://armadillosoft.com/epgy/epgyforms.php?theform=j.php
http://armadillosoft.com/epgy/epgyforms.php
http://armadillosoft.com/epgy/epgyforms.php?theform=gt.php

All comments are welcome.  And thanks again for your suggestions.

--Emily


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~                            Emily Berk                                 ~
On the web at www.armadillosoft.com *** Armadillo Associates, Inc.      ~ 
~             Project management, developer relations and               ~
extremely-technical technical documentation that developers find useful.~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.