-
if (textfield blank) {???
howdy all,
Just wondering... I'm organizing a PHP mailform and I want to check to see if some input textfields are blank... I dunno what my problem is.
Here's the code:
- - - - - - - - - - - - - - - - - - - -
on (release) {
if (email == "") {
email_alert.gotoAndPlay (2);
}
}
- - - - - - - - - - - - - - - - - - - -
"email" being the name of the text field. All I want to happen is if the text field is blank.. do something.
Any help would be greatly appreciated.
Cheers,
gc
-
Bueler?....... Bueler?......
-
-Iron Myk-
the code looks okay to me, you may just double check the target path, thats all i can figure. I'm assuimg the "email" variable is inside some instance, or at least the main timeline, so maybe the actionscript is looking for the variable, but not in the right place...and since its not there, the rest of the code cant execute...
-myk
"MOO"
-
mmm... thanks, that's not it though...
if i type if blah blah blah == "a" then type "a" in the email field it works fine... it just won't test successfully for no input at all.
i'm stumped...
-
Is it an input text box? Dynamic? I dunno... maybe play with that.
-
The Definition of...
What about if null, if there is nothing there, by default the return will be null until it is set.
L. Jones
www.urbansory.com
-
Banned
like Urbansory said u could use
on(release){
if (youtextfield eq null){
your action
}
-
ask me one on fish..not flash
well i think you have too many = signs.
i would have put
if email="" then do some clever stuff
gary
I bought a Ouija board. The pointer spelled out 'You don't actually believe in this crap, do you
-
The Definition of...
You need 2 equals or the player will think you are trying to set something not test if it is equal to the expression or whatever it is.
L. Jones
www.urbansory.com
-
Banned
you can just use "eq" instead of "=="
-
ask me one on fish..not flash
lol of course you do, i just looked in one of my fla's and there they were == sitting there giggling at me
sorry guys..
gary_wanders off hanging head in shame
I bought a Ouija board. The pointer spelled out 'You don't actually believe in this crap, do you
-
The Definition of...
on (release) {
if (email == "" or email == null) {
email_alert.gotoAndPlay (2);
}
}
L. Jones
www.urbansory.com
-
Banned
thats a simple way to win both arguments
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|