Alex & Alex,
you can put the data be validated in a model.like this:
<mx:Model id="order">
<email>{email.text}</email>//email is a
textInput controller's id
</mx:Model>
then define a validator:
<mx:EmailValidator field="order.email"/>
then write a function in the script tag:
function confirmOrder(): Void {
if (mx.validators.Validator.isStructureValid(this, 'order')) {
mx.controls.Alert.show("Success!!");
addMember();
}
else {
mx.controls.Alert.show("Please enter valid data in the fields
with errors and try again.", "Problem");
}
}
Peace,
Dreamer in china
[EMAIL PROTECTED]
2006-04-02
======= 2006-04-02 01:37:17 :=======
>Hi Mike,
>
>I understand the login, but how do I reference the validation?
>
>I mean what would actually go where you have "validation is success".
>
>I'm not an actionscrip expert! I'm a cfforever guy ;-).
>
>Alexander
>
>
>--- In [email protected], "Dreamer" <[EMAIL PROTECTED]> wrote:
>>
>> Alex & Alex,
>>
>> you can write a function,like that.
>>
>> if(validation is success)
>> addMember();
>> else
>> alert("invalid input!!!");
>>
>>
>> Peace,
>>
>> Dreamer
>> [EMAIL PROTECTED]
>> 2006-04-01
>>
>> ======= 2006-04-01 18:32:22 :=======
>>
>> >
>> >Hello,
>> >
>> >In a signup form, when I click the submit button I would like for
>all
>> >the validation to happen and then actually hit the addMember()
>> >function.
>> >
>> >But if a form fails the validation how can I prevent the
>execution of
>> >addMember().
>> >
>> >Thanks,
>> >Alexander
>> >
>> >
>> >
>> >
>> >
>> >--
>> >Flexcoders Mailing List
>> >FAQ:
>http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>> >Search Archives: http://www.mail-archive.com/flexcoders%
>40yahoogroups.com
>> >Yahoo! Groups Links
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
>> = = = = = = = = = = = = = = = = = = = =
>>
>>
>>
>>
>
>
>
>
>
>
>--
>Flexcoders Mailing List
>FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
>Yahoo! Groups Links
>
>
>
>
= = = = = = = = = = = = = = = = = = = =
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/