Submit options

G

Guest

I have a form that has several lines to fill out. At the bottom of the page
I have a bumit button. The issue is that when people hit the "enter key" to
move to the next line it will submit the form. I need a way to disable the
enter key from launching the subit button or have a option pop up to give the
user a chance to continue with the form. Any ideas. I'm using FP2003.

Thanks
 
K

Kevin Spencer

<script type="text/javascript"><!--
function kH(e) {
var pK = document.all? window.event.keyCode:e.which;
return pK != 13;
}
document.onkeypress = kH;
if (document.layers) document.captureEvents(Event.KEYPRESS);
// --></script>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
K

Kevin Spencer

Right before the </body> tag will do.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
S

Stefan B Rusynko

Kevin gave you an elegant solution which you probably have no idea what to do with or how it works
- never a good idea to use a tool if you don't know what it is doing

A simple tool to understand and use is to just set at least the last field of the Form as a required value
To set any form input fields as required values right click the Field and select Field Properties - Validate - Required
FP will generate the code for you in the right place and you can manage it

--




| I'm new to FP can you tell me where to insert this information. Be nice!
|
| "Kevin Spencer" wrote:
|
| > <script type="text/javascript"><!--
| > function kH(e) {
| > var pK = document.all? window.event.keyCode:e.which;
| > return pK != 13;
| > }
| > document.onkeypress = kH;
| > if (document.layers) document.captureEvents(Event.KEYPRESS);
| > // --></script>
| >
| > --
| > HTH,
| > Kevin Spencer
| > ..Net Developer
| > Microsoft MVP
| > I get paid good money to
| > solve puzzles for a living
| >
| > | > > I have a form that has several lines to fill out. At the bottom of the
| > page
| > > I have a bumit button. The issue is that when people hit the "enter key"
| > to
| > > move to the next line it will submit the form. I need a way to disable
| > the
| > > enter key from launching the subit button or have a option pop up to give
| > the
| > > user a chance to continue with the form. Any ideas. I'm using FP2003.
| > >
| > > Thanks
| >
| >
| >
 

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