Solved

Beep when I hit Enter on Form

Posted on 2002-06-22
3
518 Views
Last Modified: 2011-09-20
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
Comment
Question by:fi76631
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 300 total points
ID: 7101411
return false
after the test for keyCode=13
you have in your script
0
 

Author Comment

by:fi76631
ID: 7101597
Nice one mplugjan!
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 7101646
;-)
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question