Would like to take certain actions based on a word entered into a text field
I'm relatively new to using Adobe Javascript, so having troubles with this simple routine and can't figure out what I'm doing wrong. Can anyone comment on this sample code? The first test works and turns the target Red but it fails the second not equal test to turn the field yellow????
var f = this.getField("word").value; {
if (f == "hello")
event.target.fillColor = color.red;}
var f = this.getField("pswrd").value; {
if (f != "hello")
event.target.fillColor = color.yellow;
}
}
I know there it is probalby easier to use an If-Else statement but I couldn't get that to work either, so backed off to doing each step separately. Thanks for any help you can give
Lew
