Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default restrict characters

    in the action script i create

    //allowed character
    var restrict_:String =
    "a-z,A-Z,0-1,!,@,$,%,^,*,(,),[,],{,},;,\',\",/,\\,-,.,+,|, ,,";

    and in design

    <mx:TextArea id="MyTextArea" width="160" restrict="{restrict_}"/>

    but still it is not working fine ...


    infact my point is to allow all the character except (#) and (&) , since they
    couse problems if passed throw URL ...

    any idea pleas

    Salem_ Guest

  2. Similar Questions and Discussions

    1. SECOND restrict access
      I have built several databases in MySQL, in one is a table that has all the log-on information that keeps the administration side of the site...
    2. TextField.restrict
      How to make the entry to accept only "+" sign.
    3. how to read japanese characters (multilingual characters) from a text file and save them in Access database ???
      HI All i m trying to read a text file, having some japanese characters and saved as UTF-8 encoding. I m using ASP,FSO ... my code is below,...
    4. Restrict teen
      How do you restrict a teen from adult sites?
    5. Numeric characters after alphabetic characters sorting varchar2 fields
      Hi! Why numeric characters are placed after alphabetic characters sorting varchar2 fields? Example: AAA BBB 111 FFF XXX
  3. #2

    Default Re: restrict characters

    Use restrict_:String = "^#&";

    The ^ at the start of the string means to allow all characters except those that follow. In this case, # and &.
    peterent Guest

  4. #3

    Default Re: restrict characters

    Ah, cool, I did not know that!

    I was going to suggest you escape() your url string instead of restricting the
    characters. excape() converts all non-alpha-numeric characters into URL-safe
    encoding.

    Tracy

    ntsiii Guest

  5. #4

    Default Re: restrict characters

    thanks peterent .. your idea is much easier that i thought
    ..

    but for our information can you give us more details about your idea ntsiii
    (escape() )??

    thansk you peterent , ... and thanks in advance ntsiii

    Salem_ Guest

  6. #5

    Default Re: restrict characters

    escape() is a built-in Actionscript (and Javascript) function.

    See the documentation for details.

    Tracy
    ntsiii 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