all groups > coldfusion flash integration > september 2006 >
You're in the

coldfusion flash integration

group:

Validating by tab


Validating by tab jedale
9/5/2006 12:52:51 AM
coldfusion flash integration:
I am currently trying to switch my flash coldfusion pages over to submit by
flash remoting. I am having a problem with only validating the fields for a
particular tab. I thought that if I could disable all of the fields and then
enable validation for the ones on the corresponding tab then the my Update
function would work. After this is done, all I would have to do is loop over
all the fields and reistablish the validation on them. I am having a problem
however, I can't get it to disable all of the fields. I tried to set up an
alert for the "key" which spits out all of the form fields. When I do
"profile.key" in an alert all of them return as undefined. Is there something
that I am missing? Any help is appreciated.

Thanks for your time.

function validate(UpdateType){
for(var key in profile){
mx.validators.Validator.disable(this, profile.key);
<!---alert(form.key);--->
}

if(UpdateType == 'Personal'){
if(!mx.validators.Validator.isStructureValid(this, 'profile')){
userOnError();
}else{
<!---Updateform--->
UpdateForm();
}
}
}
Re: Validating by tab jedale
9/9/2006 9:50:50 PM
Re: Validating by tab The ScareCrow
9/12/2006 4:03:18 AM
I assume you have some code that enables the required fields for each "form" ?

Does the alert in the for loop show every field ?

The code posted looks okay. All I can suggest is to try replace "this" with
"_root"

if(!mx.validators.Validator.isStructureValid(_root, 'profile')){

Ken
AddThis Social Bookmark Button