Home Web Development Pressing enter on form doesn’t submit – triple ding error sound

Pressing enter on form doesn’t submit – triple ding error sound

1308
0

I don’t often do web programming, because it takes me so darn long to figure out what code does what, and I’m usually never completely cross-browser compatible (old skool IE user here), but I’ve been getting my hands dirty in it from time to time.

Tonight was one of those times. I needed to figure out why my form wouldn’t submit when I removed the Submit button. I had heard that the default action of pressing ENTER on the keyboard would submit the form, so I went ahead and killed the button. Before you yell at me about how people still expect to see a submit button, I have to say that this login form was only for my use (and my designees), people who wouldn’t cry if they didn’t see a Submit button.  Anyway, the form worked in FF, but not IE.

Every time I hit ENTER, I would hear the Windows triple DING error sound and it would not sumit the form.

so I dug and dug and guess what I found out: If you have one VISIBLE Input box in the form, you can do away with the Submit link..this is used mostly in Search boxes.  But, if you have more than one visible Input box then you will need a Submit somewhere or else you have to submit using JS. I avoid using javascript as much as possible, so the fix for me was to create a submit image that was a blank 1 pixel gif.

This link here will take you to a page describing how to get rid of the “Ding” sound completely.

Here are some suggestions for moving a submit button around using positioning.  I imagine you would use such a technique if the submit button or image was affecting your layout negatively.

 

 

and..this link is just an interesting post I found while researching the above issue. It has to do with multiple submit links on page and how to reverse the order so that the ENTER keystroke nabs the last Submit of the form and not the first…

LEAVE A REPLY

Please enter your comment!
Please enter your name here