?
Solved

Beep when I hit Enter on Form

Posted on 2002-06-22
3
Medium Priority
?
522 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 1200 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses how to implement server side field validation and display customized error messages to the client.
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…
Suggested Courses

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