Form submit

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My form is submitting when the user types a "TAB." Is there a way to avoid
this?
Thank you for the help.
 
Not w/o scripting
- add FP form validation to the last field as a required field

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| My form is submitting when the user types a "TAB." Is there a way to avoid
| this?
| Thank you for the help.
 
I'd have thought "TAB" would tab through the fields - not submit the form -
at least that's not its default function, so why would scripting be
necessary to *stop* the tab key submitting the form if that is not what it
is supposed to do in the first place?
 
Exactly, Andrew. I mistakenly put TAB instead of ENTER. It's the ENTER key
that is causing the form to submit. That's the real problem. Sorry about
that.

Andrew Murray said:
I'd have thought "TAB" would tab through the fields - not submit the form -
at least that's not its default function, so why would scripting be
necessary to *stop* the tab key submitting the form if that is not what it
is supposed to do in the first place?


Stefan B Rusynko said:
Not w/o scripting
- add FP form validation to the last field as a required field

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| My form is submitting when the user types a "TAB." Is there a way to
avoid
| this?
| Thank you for the help.
 
The Enter key will always submit the form, the easiest way to prevent
this is to make the last form field (immediately before the submit
button) a required field. See Stefan's post earlier in this thread.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/


Mary said:
Exactly, Andrew. I mistakenly put TAB instead of ENTER. It's the ENTER key
that is causing the form to submit. That's the real problem. Sorry about
that.

Andrew Murray said:
I'd have thought "TAB" would tab through the fields - not submit the form -
at least that's not its default function, so why would scripting be
necessary to *stop* the tab key submitting the form if that is not what it
is supposed to do in the first place?


Stefan B Rusynko said:
Not w/o scripting
- add FP form validation to the last field as a required field

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| My form is submitting when the user types a "TAB." Is there a way to
avoid
| this?
| Thank you for the help.
 
Ronx said:
The Enter key will always submit the form, the easiest way to prevent
this is to make the last form field (immediately before the submit
button) a required field. See Stefan's post earlier in this thread.
--

Another way to stop the enter key from submitting is put this in the last
form field, in this case a text box

<input type="text" id="no" value="" size="1" maxlength="3"
onkeypress="return event.keyCode!=13"/>

13 is the keycode for enter, so pressing it will do nothing.
 
That onkeypress code will have to go into EVERY field in the form, if
only in the last field, the enter key is only checked for in the last
field.
With validation, the last field is checked for a valid entry.
However, it is possible to submit an incomplete form if the user
enters data into the fields in reverse order..
 
Back
Top