|
-
Feb 22nd, 2001, 05:15 AM
#1
Thread Starter
Hyperactive Member
Hopefully a nice easy question. I have a form, but when the user presses enter on a textbox, the form submits, which I do not want it to do. I have the following code, but don't know how to cancel the form from submitting.
JAVASCRIPT
function textchange(thekey)
{
if(thekey==13)
{
This is where the code should go I believe, that would cancel the submission.
}
}
HTML
<input SIZE=10 type='text' name='thedate' onKeypress="textchange(event.keyCode);'"></TD></TR>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|