enter to submit the form

hi

is planned in future releases the possibility of submitting a form by pressing enter?

to get this in the current version I use javascirpt and it works correctly,
but it would be nice to have something more simple.

thanks
Marco

Re: enter to submit the form

sal
Can you give me the script for submit when press enter in a field ?

Re: enter to submit the form

Form onLoad: used for user login screen


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.input_username.onkeypress=submitenter;
document.F1.input_password.onkeypress=submitenter; 

if (document.F1.input_username.value == '') {
 document.F1.input_username.focus(); 
} else {
 document.F1.input_password.focus(); 
}

Regards,
Scott.

Re: enter to submit the form

Thank you very much for your help
But I have a problem
I tested the script exactly as written.
integrated into the application “control” works perfectly
integrated into the application “form” does not work
I did exactly the same steps in parallel for both applications.

in “form” write something in the box and press “Enter” but will be back in edit mode without inserting anything in the database, and no error occur.

I do not know what to make it work

you’ve hit the same problem?
Can you help me?

Thanks in advance

Re: enter to submit the form

Did you turn debug on to see if was an error?

The other option is to create a new button and remove the default submit button. Just like a control app.

Regards,
Scott.

Re: enter to submit the form

I hope to be introduced this option as soon as possible in scriptcase …

Thanks for your help

Re: enter to submit the form

I found where the problem was
in the application “control” works with
document.F1.submit();

but in application “form” should be
nm_atualiza (‘incluir’);

It is exactly the same as when you click “add”

In my script looks like this

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

if (keycode == 13) {
nm_atualiza (‘incluir’);
return false;
} else return true;
}

document.F1.nume.onkeypress=submitenter;

hope will be helpful to others …

Re: enter to submit the form

thaks i modifai with alterar

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

if (keycode == 13) {
nm_atualiza (‘alterar’);
return false;
} else return true;
}

document.F1.nume.onkeypress=submitenter;