June 02, 2008, 11:48 AM
KentOMaintain AutoSkip to the next field conflicts with having a default button.
I now have to use JavaScript behind the Keypress event on a Maintain screen to move the cursor from one field to another when the first field is filled with data. An example of the JavaScript code follows:
function OnL1feedback_Edit_KeyPress ( ) {
if (document.Form1.Field1_Edit.value.length > 49)
{document.Form1.Field2_Edit.focus();}
else
{document.Form1.Field1_Edit.focus();}
}
The problem with this is that pressing the enter key will not activate the Default Button if the cursor is still in Field1.
Is there a way to move the cursor to the next field when the previous field is filled but still have a active Default button if enter is pressed from the first field?
Thanks, Kent
June 04, 2008, 10:48 AM
Maintain WizardIn the JavaScript, could you check the value of the keypress, and if it is ENTER then PERFORM the case behind the default button?
Mark