Professional Web Applications Themes

how do i test a string has certain characters? - Macromedia Flash Actionscript

If i have entered text into an input text box, say for an email address. How do i check whether that text has certain characters in it, such as '' ? It would be a great help in anyone can help me? thank you....

  1. #1

    Default how do i test a string has certain characters?

    If i have entered text into an input text box, say for an email address. How do i check whether that text has certain characters in it, such as '' ?

    It would be a great help in anyone can help me?

    thank you.


    FlashAsh99 webforumsuser@macromedia.com Guest

  2. #2

    Default Re: how do i test a string has certain characters?

    Place = myString.indexOf("");

    --

    Pierre Alain

    [email]pielifnet.com[/email]


    "FlashAsh99" <webforumsusermacromedia.com> a écrit dans le message de
    news:bv9tq5$n3i$1forums.macromedia.com...
    > If i have entered text into an input text box, say for an email address.
    How do i check whether that text has certain characters in it, such as '' ?
    >
    > It would be a great help in anyone can help me?
    >
    > thank you.
    >
    >

    PierreAlain Guest

  3. #3

    Default Re: how do i test a string has certain characters?

    use the indexOf() property of strings. for example,
    if(tbox.text.indexOf()<1){
    //not a valid email address
    }


    kglad webforumsuser@macromedia.com Guest

  4. #4

    Default Re: how do i test a string has certain characters?

    Thanks!


    FlashAsh99 webforumsuser@macromedia.com Guest

  5. #5

    Default Re: how do i test a string has certain characters?

    you're welcome.


    kglad webforumsuser@macromedia.com Guest

Similar Threads

  1. String - Cut off trailing characters
    By Adam Cameron in forum Macromedia ColdFusion
    Replies: 0
    Last Post: February 15th, 11:01 PM
  2. Trunc characters off end of string.
    By aiden_m webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 1
    Last Post: September 8th, 04:20 PM
  3. print the first 20 characters of a string
    By Ricki Susic in forum PHP Development
    Replies: 5
    Last Post: August 28th, 03:37 PM
  4. Counting characters in a string
    By Bill in forum ASP
    Replies: 0
    Last Post: August 22nd, 05:16 PM
  5. change some characters of one String
    By [XaToA] in forum PHP Development
    Replies: 1
    Last Post: July 17th, 11:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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