Frontpage Form/Submit Button Question

D

David Ray

My daughter is working on a project for school which involves a form done in
FrontPage.

The problem is this: If the respondent is partially through completing the
form and inadvertently hits <ENTER>, the Submit button is selected and the
form is submitted even though it was unintended (since the form hadn't been
fully completed at the time).

I've looked for a way to NOT have the submit button as the "default" when
<ENTER> is pressed, but don't find one.

I have two questions:

a) Can anyone suggest a SIMPLE workaround or tell me how to require the
respondent to actually TAB TO or CLICK the Submit button to make it take
effect?

b) Is there anything to prevent me from having multiple SUBMIT buttons on a
page? Some respondents don't need to complete the entire survey; these can
just submit before the bottom of the page.


TIA for any responses...

David
 
J

Jim Buyens

Try adding this script to the <head> section of the page:

<script language="javascript">
function keyPress()
{
if (event.keyCode == 13)
{
event.returnValue = false;
}
}
</script>

This stops the Enter key from working anywhere on the
form. In other words, you *must* submit the form by
clicking.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top