Friday, September 24, 2010

This is for the technical friends who want to save big time through Jquery

Setup the cursor focus on first field of form using Jquery.

( I Personally prefer to do this change which is a alternative to Javascript )


Set focus on the first text field:

 $("input:text:visible:first").focus(); 

This also does the first text field, but you can change the [0] to another index:

$('input[@type="text"]')[0].focus(); 

Or, you can use the ID:

$("#someTextBox").focus();