Pressing Enter to Save (in a form)

Hi,

In the form login (with captcha), I enter login, password; then I press enter when at password field, and the system tries to log me in, that is the login/password are sumbitted.

Now when I press enter at the captcha, I don’t get the same effect?

Why? And how to achieve that?

Thank you for answering to my questions.

[QUOTE=michael;25624]Hi,

In the form login (with captcha), I enter login, password; then I press enter when at password field, and the system tries to log me in, that is the login/password are sumbitted.

Now when I press enter at the captcha, I don’t get the same effect?

Why? And how to achieve that?

Thank you for answering to my questions.[/QUOTE]

try this,
in login form:

  1. javascript
  2. select object (form)
  3. select the event (on load)
  4. edit
  5. and paste this code

function submitenter(e) {
var keycode;
if (window.event) keycode = window.event.keyCode; // IE
else keycode = e.which; // FF

if (keycode == 13) {
document.F1.submit();
return false;
} else return true;
}

document.F1.onkeypress=submitenter;

1 Like