Send alert if certain text is inserted in a text field


hi everyone,

 

i total noob on javascript , permission i'd ask solution on this.

i need on creating validation script in scenario:

if content inserted in text field "apple", send alert "it's red", if content inserted "banana", send "it's yellow". if else inserted send alert "i have no idea"

 

how should write validation script?

 

thanks million!

if (event.value=="apple") app.alert("it's red!",3);

else if (event.value=="banana") app.alert("it's yellow!",3);

else if (event.value!="") app.alert("i have no idea.",3);



More discussions in JavaScript


adobe

Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support