I'm working on a page that should redirect depending on what the user enters in the form, and I can't seem to figure it out. New to Javascript, and eager to learn!Here is the html:\[code\]<body><div id="header"> <div id="navcontainer"> <ul> <li> <a href="http://stackoverflow.com/questions/15734486/#item1">Home</a> </li> <li> <a href="http://stackoverflow.com/questions/15734486/#item2">Scents</a> </li> <li> <a href="http://stackoverflow.com/questions/15734486/#item3">About</a> </li> <li> <a href="http://stackoverflow.com/questions/15734486/#item4">Contact</a> </li> </ul> </div> </div><div id="content"> <p>Hi, how are you feeling today?</p> <form> <input id="feels" type="text" name="feeling" size="35" onchange="checkfeels(#feels.value);"> <input type="submit" value="http://stackoverflow.com/questions/15734486/submit" > </form></div>\[/code\]And the Javascript I have so far:\[code\]function checkfeels(myFeels) { switch (myFeels) { case "good": document.location.href = 'http://stackoverflow.com/questions/15734486/scents.html'; break case "bad": alert(2); document.location.href = 'http://stackoverflow.com/questions/15734486/scents2.html'; default: alert("whatever"); } }\[/code\]Any help is really appreciated, thanks!