Click to See Complete Forum and Search --> : field validation
joelo
08-29-2003, 06:29 AM
Please I some help in writting up the following range validation
in array
IF((PRE_LEFTPRESSURE_.value<PRE_SETPOINTPRESSURE_.value*0.95,PRE_LEFTPRESSURE_.value<PRE_SETPOINTPRESSURE_.value*1.05)
alert("ERROR!!!...out of Range"))
Thanx
Nevermore
08-29-2003, 06:47 AM
What's wrong with it?
Charles
08-29-2003, 06:54 AM
if (PRE_LEFTPRESSURE_.value < PRE_SETPOINTPRESSURE_.value * 0.95 && PRE_LEFTPRESSURE_.value < PRE_SETPOINTPRESSURE_.value * 1.05)
{alert('ERROR!!!...out of Range')}
joelo
08-29-2003, 07:23 AM
Hey charles,
thanx for your help
Please How do I add array to the function
if (PRE_LEFTPRESSURE_.value < PRE_SETPOINTPRESSURE_.value * 0.95 && PRE_LEFTPRESSURE_.value < PRE_SETPOINTPRESSURE_.value * 1.05)
{alert('ERROR!!!...out of Range')}
joelo
08-29-2003, 07:53 AM
Please what am I missing
function OutofRangeCheck(){
for(i=0; i<document.device.PRE_LEFTPRESSURE_.length; i++){
for(i=0; i<document.device.PRE_SETPOINTPRESSURE_.length; i++){
if (PRE_LEFTPRESSURE_[i].value < PRE_SETPOINTPRESSURE_[i].value * 0.95 && PRE_LEFTPRESSURE_[i].value < PRE_SETPOINTPRESSURE_[i].value * 1.05){
alert('ERROR!!!...out of Range')
PRE_LEFTPRESSURE_[i].value.focus();
return (false);
}
}
}
Charles
08-29-2003, 12:02 PM
What do you mean by "add an array?" I will not be able to help you unless you explain clearly and fully what exactly you are trying to accomplish. I expect taht you will not be able to do this, which is why you are having trouble with your JavaScript, but give it a try anyway.
joelo
08-29-2003, 12:36 PM
Hey charles,
I ve added array to it ....I just need correct it for, I don't seem to know what I am doing wrong....I U don't mind.
Thanx
Charles
08-29-2003, 12:40 PM
Please
1) Describe exactly what you are trying to accomplish;
2) Post a URL for the rest of the page;
3) Do neither 1 nor 2 unless you do both.
joelo
08-29-2003, 12:48 PM
I a dynamic for form that grows from displaying one record to multiple records and I need the function to able to process multiple records.....that's why I need your help in addin the array to the function....I don't know if I am making any sense.
Charles
08-29-2003, 12:52 PM
Originally posted by joelo
I don't know if I am making any sense. Some, but you haven't given me the rest of the page and you haven't told me what exactly you are trying to accomplish. If you cannot explain something to me, another human being, then you will not be able to explain it to a computer.
joelo
08-29-2003, 12:59 PM
here is the page
Charles
08-29-2003, 01:34 PM
1) You still haven't explained what you are trying to accomplish.
2) That is not JavaScript.
joelo
08-29-2003, 05:13 PM
I am trying to check the value of a field (PRE_idLEFTPRESSURE_.value) to stay within a specific range value based what value of PRE_SETPOINTPRESSURE_.value Field is. (RangeValue Validation)
joelo
08-31-2003, 07:48 AM
Please Help me
I am trying to check the value of a field (PRE_idLEFTPRESSURE_.value) to stay within a specific range value based what value of PRE_SETPOINTPRESSURE_.value Field is. (min, max Validation)
function OutofRangeCheck(){
for(i=0; i<document.device.PRE_LEFTPRESSURE_.length; i++){
for(i=0; i<document.device.PRE_SETPOINTPRESSURE_.length; i++){
if (PRE_LEFTPRESSURE_[i].value < PRE_SETPOINTPRESSURE_[i].value * 0.95 && PRE_LEFTPRESSURE_[i].value > PRE_SETPOINTPRESSURE_[i].value * 1.05){
alert('ERROR!!!...out of Range')
PRE_LEFTPRESSURE_[i].value.focus();
return (false);
}
}
}