Hi
You can simply use this javascript function to move focus to the second textbox, call this function on the keypress event of first textbox as below:
<input type="text" id="txt1" onkeypress="MoveFocus(this.id,'txt2')">
here 'txt2' is the id of second textbox
function MoveFocus(source,target)
{
var source = document.getElementById(source);
var target = document.getElementById(target);
if(source.value.length >= 2)
target.focus();
}
Regards
Mike
Fortune favours the brave, so don't regret on missed oppurtunities.
|