Set Cursor Focus in Tabular Forms

In tabular forms I like to add a javascript function that allows the user to navigate vertically using the up and down arrows on the keyboard (see previous posts), which is now out of the box in Apex 4. A nice little add-on to this is to automatically select the contents of the cell when the cursor enters it. This can be easily achieved by adding the following to the Execute when Page Loads region of the page details.

$("input[type=text]").focus(function () {
this.select();
});

Comments