document.getElementById('textbox').value stopped working

wavz

New Member
my code is very simple. I want the user to be able to type in a restaurant name and have my function tell them whether that restaurant serves Coke or Pepsi products. It worked fine an hour ago, but stopped working. Now, it shows the work "Pepsi" no matter what you type in. My guess is that there is something wrong with the if statements.\[code\]<html><noscript><b><center><font size="16">This app requires JavaScript to be enabled. Enable JavaScript on your browswer to make it work.</font></center></b></noscript><center><form onsubmit="popproducts()"><br><br><br><br><br><br><br><br><br><input id="textbox" type="text" style="height: 100px; width: 500px" value=""></input></br></br></br></br></br></br></br></br></br></form></center><script type="text/javascript">function popproducts(){ if(document.getElementById('textbox').value =http://stackoverflow.com/questions/14062782/="Cougars" || "Kane County Cougars" || "Cougars Baseball") { document.write('<center><br><font color="#0000FF" size=20></b>Pepsi</b></font></br></center>'); document.write('<br><br><center><form><input type="button" style="height: 100px; width: 100px" value="http://stackoverflow.com/questions/14062782/Back" onClick="history.go(-1);return true;"></form></center></br></br>'); } if(document.getElementById('textbox').value =http://stackoverflow.com/questions/14062782/="Burge" || "Iowa" || "University of Iowa") { document.write('<center><br><font color="#FF0000" size=20><b>Coke</b></font></br></center>'); document.write('<br><br><center><form><input type="button" style="height: 100px; width: 100px" value="http://stackoverflow.com/questions/14062782/Back" onClick="history.go(-1);return true;"></form></center></br></br>'); }}</script></html>\[/code\]
 
Back
Top