Compare string and alert in dialog
<HTML> <HEAD> <SCRIPT language="JavaScript"> <!-- var thesport="Golf"; var myfood="Pizza"; if(thesport=="Football"){ window.alert("Cool Sport!"); }else{ window.alert("That sport might be cool."); } if(myfood=="Pizza"){ window.alert("My favorite food!"); }else{ window.alert("That food sounds OK I guess."); } //--> </SCRIPT> </HEAD> <BODY> </BODY> </HTML>