/    Sign up×
Community /Pin to ProfileBookmark

hi , just a wonder

what is validFlag, im unsure of what its function is or what it does in the code.

thanks

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@to_knowauthorJun 26.2003 — this is a continuation of the previous thread...this is the actual code, but it doesnt seem to work, the code is fixed on a delphi programme............

function checkFields(PEPSection_A_Form)

{

var num = PEPSection_A_Form.elements.length;

var validFlag = True;

for (var i=0; i<num; i++){

if ((PEPSection_A_Form.elements[i].value == "") &&
(typeof PEPSection_A_Form.elements[i] == "FIELD") &&
(typeof PEPSection_A_Form.elements[i] == "FIELD") &&
(typeof PEPSection_A_Form.elements[i] == "FIELD") &&
(typeof PEPSection_A_Form.elements[i] == "FIELD") &&
(typeof PEPSection_A_Form.elements[i] == "FIELD") &&
(typeof PEPSection_A_Form.elements[i] == "FIELD") &&
(typeof PEPSection_A_Form.elements[i] == "FIELD"))
{
validFlag = False;
}

}

if (validFlag == False) {

alert("The field is blank, please fill the required nfields for this form to be processed.")

}else{

alert("This is a blank record.")

}

return validFlag

}
Copy linkTweet thisAlerts:
@petermar30030Jun 26.2003 — Not Sure If I Ever Heard Of That Command, Were Did You Here About It?
Copy linkTweet thisAlerts:
@pyroJun 26.2003 — I've never heard of it. I would think it is a custom function/variable. If you post you code, I can tell you for sure.
Copy linkTweet thisAlerts:
@pyroJun 26.2003 — I merged the threads together...no need to start new threads on the same topic.

validFlag is just a variable. It is origianally set to True, and if certain conditions are met, it is set to False. It is then used later to popup and alert depending on if it is true or false.
Copy linkTweet thisAlerts:
@to_knowauthorJun 26.2003 — but how comes then when i run the code with the event handler set on the scrip event of the component it does not work especially when i move off the form 'save(button)' this is my function 'checkFields(this);'..........


thanks for responding tho...?
×

Success!

Help @to_know 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 5.24,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...