form validation in flash mx

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default form validation in flash mx

    i've created a simple form in flash that is hooked to a scrpit that handles the information but i wish for flash to validate some basic info before it is submitted to the script.
    i tired using the "if" command but could not get it to work.
    What is the action I need to put in in order to have it check if there's a "@" included in an email field for example ? I know the == command but what about "isf a certain symbol included i nthe field, Then ..." type of command ?

    Thank you for your help
    s.




    honestnotes webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Flash form with cfinput validation not working
      when using a cfform with format flash and using a cfinput in that form the validate field does not work. but when using the same validation with a...
    2. CFFORM Validation trumping Custom Form Validation
      Is there any way for custom form validation to work in concert with the cfform validation? I have a custom script that compares the values of two...
    3. Flash Form Validation
      Hi, I have a flash form as below. <cfform action="#CGI.SCRIPT_NAME#?event=users.passwordchangeaction" method="post" name="passwordchange"...
    4. flash form validation functions
      had to play around with it, turns out you can't put that complex of actionscript in the bind attribute. But if you use a button, or anything with a...
    5. Validation with a flash form
      You need to do this with inline actionscript, instead of javascript. try this: <cfform format="flash"> <cfinput type="Text" name="jsPass1"...
  3. #2

    Default Re: form validation in flash mx

    if(mailText.indexOf("@")<>-1){
    // included @
    .......
    }else{
    //no @
    ......
    }


    MarxEinstein webforumsuser@macromedia.com Guest

  4. #3

    Default Re: form validation in flash mx

    thanks for your reply
    this is not working for me - maybe i am not changing the right parameters.
    the valiable i need to check is named "email"
    please advice
    thank u again .



    honestnotes webforumsuser@macromedia.com Guest

  5. #4

    Default Re: form validation in flash mx

    if(email.indexOf("@")<>-1){
    ........

    what is type of the variable "email"?



    MarxEinstein webforumsuser@macromedia.com Guest

  6. #5

    Default Re: form validation in flash mx

    it's an input text var.
    is that ok ?


    honestnotes webforumsuser@macromedia.com Guest

  7. #6

    Default Re: form validation in flash mx

    I have tested in my computer,it's Ok.

    .......




    MarxEinstein webforumsuser@macromedia.com Guest

  8. #7

    Default Re: form validation in flash mx

    It works - THANK YOU SO SO SO SO MUCH !
    Peace
    s.


    honestnotes webforumsuser@macromedia.com Guest

  9. #8

    Default Re: form validation in flash mx

    While we are here let me ask you tow more quick questions regarding this matter :
    How do i validate a var to include only numerals?
    and also how do i sting all of these validations together? I need something like
    if A does not include B the B=_______, and if X does not include y then X=___________ ( etc... ) -
    else >>>>>> ....

    thanks for your help.
    s.



    honestnotes webforumsuser@macromedia.com Guest

  10. #9

    Default Re: form validation in flash mx

    help anyone ?



    honestnotes webforumsuser@macromedia.com Guest

  11. #10

    Default Re: form validation in flash mx

    It is an easy job, it can be done without ActionScript.Select the inputText, and look at the properties window, there is a button named "character", press it , and you can define what letters can be fill in the inputText. you can defined "1234567890", and users can not type any other letters in you inputText but Numbers.


    MarxEinstein Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139