Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Tabbing

Status
Not open for further replies.

Joelo

MIS
Sep 27, 2003
61
Please I am trying to get the validation function to auto tab to next textbox after min_maxCheck() function.

please could somebody help me out


<script language=javascript>
function trigger(){
var a=document.getElementsByName('PRE_LEFTPRESSURE_<%=Ext_Record_Count%>')[0].value;
if (!isNaN(parseInt(a))) {return min_maxCheck();}
}
function min_maxCheck(){
for(i=1; i< <%= Ext_Record_Count%>+1; i++) {
if (document.getElementById('PRE_idLEFTPRESSURE_'+i).value < document.getElementById('PRE_idSETPOINTPRESSURE_'+i).value * 0.95 || document.getElementById('PRE_idLEFTPRESSURE_'+i).value > document.getElementById('PRE_idSETPOINTPRESSURE_'+i).value * 1.05){
alert('ERROR!!!...LEFT PRESSURE out of Range');
document.getElementById('PRE_idLEFTPRESSURE_'+i).focus()
if return (false); {return (function loadTI();}
}
}
}
function loadTI(){
var obj=null;
var index=null;
for (b=0; b < document.device[0].elements.lenght; b++){
obj=document.device[0].elements;
index=obj.getAttribute("tabindex");
if (index > -1){
arrayTI[index] = obj;
}
}
}
</script>
 
What happens and what should happen? Btw without HTML form code this is a little bit harder to debug.
Btw2 this looks weird:

Code:
document.getElementById('PRE_idLEFTPRESSURE_'+i).focus()
if return (false); {return (function loadTI();}
 
That's were I am Lost..........I need the Function min_maxCheck() to trigger function loadTI() to run .... Auto tabbing the cursor to the next textbox
 
This is relatively simple to solve but... please send relevant HTML code (FORM ... /FORM, all PRE_* elements and trigger() call).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top