Flash Form Validation : ComboBox Validation : AS3 : Flash CS3
I'm doing a simple validation for a flash form created. It's working fine with text filed and Radio groups. But Having issue with ComboBox. Anybody able to help? Thanks in advance.
Is it possible to write as ,
} else if (!placeopCombo.selected) { status_txt.text = "Please choose Place of Purchase";
My code is below
if(!nameTxt.length) { status_txt.text = "Please enter your name"; } else if (!emailTxt.length) { status_txt.text = "Please enter your email"; } else if (!mobileTxt.length) { status_txt.text = "Please enter your mobile number";
} else {
//do the su开发者_JS百科bmitting
The selectedItem property is null until you select something so you should be able to do this:
} else if (!placeopCombo.selectedItem) { status_txt.text = "Please choose Place of Purchase";
Aternatively you can check if the index or label are different to an initial/default value
} else if (placeopCombo.selectedIndex != defaultIndex) { status_txt.text = "Please choose Place of
Don't know if it's handy at this stage, but also have a look at the Yahoo! Form components.
精彩评论