PDA

View Full Version : [MX] If character exist in text??



aussie_devil
July 20th, 2003, 12:39 AM
How would I do this..

For example if I had an input field and i could not allow the characters like <space> and ony <underscore "_"> how would I do this??

I am guessing you would have to somehow check through ecach character to see if it was a " " with an if else statement.. but that would take forever.. so.. =S

Thanks in advance.. =D

claudio
July 20th, 2003, 12:50 AM
myText.restrict = "^ "; Where myText is your textfield insance name. This allows the user to enter any character except a blank space.

phorte
July 20th, 2003, 01:39 AM
hi..

hmm.. i not sure that really worked.. but i clicked on like the reference button and there was all stuff there about the script type.. so it must work.. maybe you can tell me what i am doin wrong.. i will attach a sample..

i wasnt really sure where i should put the script either?? and is there like some extra script too??


Thanks..

-Scott

claudio
July 20th, 2003, 01:42 AM
Here

phorte
July 20th, 2003, 01:44 AM
aha.. the name should be in the instance not the var.. aha.. i get it.. thanks.. =D

-Scott

claudio
July 20th, 2003, 01:48 AM
No problem ;)