Disable Enter button
It is working fine, the problem is whenever someone types in their ID number and they press "Enter" it goes nowhere. They have to physically hit the "Submit" button. How can I disable the enter key in that specific page or link it to press the submit button?
Your button is a "button". To make it submit when its clicked you need to change the type to submit.
Yes, make it a submit button. Just out of interest, if you did want to disable the enter key, you could do this:
However, I do not recommend doing this since the problem can be solved in 6 letters (submit).
<input id="password" type="text" name="password" size="20" onkeypress="return handleEnter(this, event)">
function handleEnter(field, event)
if(event.keyCode == 13) // Enter has been pressed
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread