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>
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>