Solved

Beep when I hit Enter on Form

Posted on 2002-06-22
3
516 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
Comment Utility
return false
after the test for keyCode=13
you have in your script
0
 

Author Comment

by:fi76631
Comment Utility
Nice one mplugjan!
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
;-)
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now