Re: Suppressing carriage return in a form action??

by Berk/Devlin <armadill(at)earthlink.net>

 Date:  Wed, 13 Jun 2001 11:47:37 -0700
 To:  "Norman Bunn" <norman.bunn(at)craftedsolutions.com>,
hwg-techniques(at)mail.hwg.org
 References:  norton
  todo: View Thread, Original
Sorry for this ignorant follow-up; I don't do much JavaScript:

But, does the NAME="submit" of the form relate to the OnSubmit, or can I name the form whatever I like?  (I have several so I probably need to either pass the name of the form to the validator or create several validators.)

<FORM METHOD=POST ACTION="/cgi-bin/formmail.cgi" NAME="submit" onSubmit="return chkChar();">

Guess the answer is that NO, can't do this in HTML, must be in JavaScript.  

BUT, I could also do it in PHP on the page specified by the ACTION parameter, couldn't I?  Yup, I think that's what I need to do.

Thanks for getting me started!

--Emily

At 02:20 PM 6/13/01 -0400, Norman wrote:
>Use onSubmit to call a JavaScript program that checks form validity.  If not
>valid, you can popup alerts or confirms; otherwise the form submits as
>expected.  I do this at:
>
>www.newberryarp.org
>
>on the e-mail newletter form.
>
>Norman
>www.craftedsolutions.com
>
>> 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?
>>
>> TIA,
>>
>> --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