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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input text, verify no empty fileds

Status
Not open for further replies.

Copierbw

Technical User
Sep 25, 2002
112
IE
Can't understand this:

I have input text fields on the stage. Their var names in text properties are called (Surname, Fno, contactNo, QueryDetail) with no instance names. On the script below I am checking to see that the fields are not empty when submitting, if so it must goto frame6 and stop if it's not goto frame2 and stop. But for some reason it submits the values as blank to the dbase and goto frame2. Am I missing something or must I clear the text fields beforeentering the frame? Thanks...

on (release) {
if(Surname == "" && Fno == "" && contactNo == "" && QueryDetails == "") {
gotoAndStop(6);
}else{
loadVariables(" this, "POST");
gotoAndStop(2);
}
}


You don't need eyes to see just the vision because there are always more ways and different answers to what we are used to...
 

you might be best to give all fields a blank value in frame 1 (surname="", etc) otherwise if a field has never been touched it might well be returning undefined.

undefined is not the same as blank.
 
Thanks Bill, I also suspected that it's returning a "value" instead of "nul". I guess it was a plain and basic question but it's always good to have other opinions as well for incase I missed something...Cheers..

You don't need eyes to see just the vision because there are always more ways and different answers to what we are used to...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top