jalbertson
Technical User
Ok I have a very basic if/else statement. I am wanting to know how to make a link say one thing, Like Not old enough! or You are Old enough. and depending on what answer you get it takes you to one of two different websites. I am listing my code to see if anyone has any ideas.
Thanks in advance!
Code:
if (entry < 21) {
answer.text = "Not Old Enough!";
answer.onPress = getUrl("[URL unfurl="true"]http://www.yahoo.com/",[/URL] "_self");
answer.textColor = "0xFF0000"
} else {
answer.text = "You are Old Enough!";
answer.onPress = getUrl("[URL unfurl="true"]http://www.google.com/",[/URL] "_self");
answer.textColor = "0x0000FF"
}
Thanks in advance!