simontheak
09-13-2002, 12:41 PM
I feel rather silly writing this, but I think I'm stuck.
All I want to do is check the value of a text field in a form I'm creating. If the field is empty I want to pop up a little message in another dynamic text field (variable 'error') saying something along the lines of please fill in your first name.
Here's the code I've got on the button:
on (release, keyPress "<Enter>") {
if(_root.form.firstName==""){
error="Please Enter a first Name"
}
else{
error="That's ok"
}
}
It seems to work fine if I place a specific word in the quotation marks at the top ... but I just can't get it to recognise the fact that the firstName variable is empty!
Thanks for any help
All I want to do is check the value of a text field in a form I'm creating. If the field is empty I want to pop up a little message in another dynamic text field (variable 'error') saying something along the lines of please fill in your first name.
Here's the code I've got on the button:
on (release, keyPress "<Enter>") {
if(_root.form.firstName==""){
error="Please Enter a first Name"
}
else{
error="That's ok"
}
}
It seems to work fine if I place a specific word in the quotation marks at the top ... but I just can't get it to recognise the fact that the firstName variable is empty!
Thanks for any help