Versions Compared

Key

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



Info

This feature is available with Profound UI releases later than Version 6 Fix Pack 4.1.

This function moves the text cursor to the next enabled visible input element from the current element.

Parameter:

  • currentElement -- the reference to the current DOM element.

Example:

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 Enter and Alt-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:

Code Block
languagejs
removeEvent(pui.runtimeContainer,"keydown",enterDoesTab);