• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 526
  • Last Modified:

Beep when I hit Enter on Form

Hi All,

<form ....>
<input type="text" ....>
</form>

When I position the cursor on the text box of the form and hit enter, the IE 5.5 generates a BEEP. Its not your standard 'click' sound, its like an error beep.

The reason is because I do NOT have an input="submit" or input="image" form element. Its as if the browser if trying to respond to the enter key press event by submitting the form for me, but cant find a form element that would be responsible for performing a submit action (ie: a submit or an image element)

Why dont I have either of these?...because I am controlling the submitting of the form through Javascript.

The problem?...the beep is really annoying!!...can anyone suggest a way of getting rid of it.....maybe cancelling the event?...

I have tried event.cancelBubble=true for the keyPress, keyUp and KeyDown events, but no joy.

Any help or suggestions appreciated
Thanks
0
fi76631
Asked:
fi76631
  • 2
1 Solution
 
Michel PlungjanIT ExpertCommented:
return false
after the test for keyCode=13
you have in your script
0
 
fi76631Author Commented:
Nice one mplugjan!
0
 
Michel PlungjanIT ExpertCommented:
;-)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now