Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can use this API and the related API pui.gotoPreviousElement() to move the cursor forward and backward through all enabled visible input elements on a panel by using the Tab Enter and Alt-Tab Enter keys respectively.

Add this code to the “onload” event of a record format:

Code Block
languagejs
window.enterDoesTab = function(event) {
   event = event || window.event;
   if (event.keyCode == 13) {
     if (event.ctrlKey || event.shiftKey)
       return;
     preventEvent(event);
     if (event.altKey)						// Alt-Enter key pressed
       pui.gotoPreviousElement(event.srcElement);
     else									// Enter key pressed			
       pui.gotoNextElement(event.srcElement);
   }
}

addEvent(pui.runtimeContainer, "keydown", enterDoesTab);

...


Add this code to the “onsubmit” event of the same record format:

...