/    Sign up×
Community /Pin to ProfileBookmark

field validation

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

to post a comment
JavaScript

13 Comments(s)

Copy linkTweet thisAlerts:
@NevermoreAug 29.2003 — What's wrong with it?
Copy linkTweet thisAlerts:
@CharlesAug 29.2003 — [font=monospace]if (PRE_LEFTPRESSURE_.value < PRE_SETPOINTPRESSURE_.value * 0.95 && PRE_LEFTPRESSURE_.value < PRE_SETPOINTPRESSURE_.value * 1.05)

{alert('ERROR!!!...out of Range')}[/font]
Copy linkTweet thisAlerts:
@joeloauthorAug 29.2003 — 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')}
Copy linkTweet thisAlerts:
@joeloauthorAug 29.2003 — 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);

}

}

}
Copy linkTweet thisAlerts:
@CharlesAug 29.2003 — [font=georgia]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.[/font]
Copy linkTweet thisAlerts:
@joeloauthorAug 29.2003 — 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
Copy linkTweet thisAlerts:
@CharlesAug 29.2003 — [font=georgia]Please

1) Describe [i]exactly[/i] 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.[/font]
Copy linkTweet thisAlerts:
@joeloauthorAug 29.2003 — 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.
Copy linkTweet thisAlerts:
@CharlesAug 29.2003 — [i]Originally posted by joelo [/i]

[B]I don't know if I am making any sense. [/B][/QUOTE]
[font=georgia]Some, but you haven't given me the rest of the page and you haven't told me what [i]exactly[/i] 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. [/font]
Copy linkTweet thisAlerts:
@joeloauthorAug 29.2003 — here is the page

[upl-file uuid=b18b63e9-66d8-41eb-b9b9-f56b483cf953 size=69kB]sampleeditreal.txt[/upl-file]
Copy linkTweet thisAlerts:
@CharlesAug 29.2003 — [font=georgia]1) You still haven't explained what you are trying to accomplish.

2) That is not JavaScript.[/font]
Copy linkTweet thisAlerts:
@joeloauthorAug 29.2003 — 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)
Copy linkTweet thisAlerts:
@joeloauthorAug 31.2003 — 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);

}

}

}
×

Success!

Help @joelo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...