Focus Next Control : Focus Tab : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » Focus Tab »

 

Focus Next Control



function focusNext(form, elemName, evt) {
    evt = (evt? evt : event;
    var charCode = (evt.charCode? evt.charCode :
        ((evt.which? evt.which : evt.keyCode);
    if (charCode == 13) {
        form.elements[elemName].focus();
        return false;
    }
    return true;
}

onkeypress="return focusNext(this.form, 'name2', event)"

           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» Focus Tab