title: HTML/JavaScript Redirect
body: <p>I have this code where i want to redirect the same page to a new html page but i cant just do it. The code is for form
  The html page is with me
  please help</p>
  
  <pre><code>&lt;form class="white-pink" align="center" name="myForms" method="post"&gt;
              &lt;h1&gt;Search Form 
                      &lt;span&gt;Please Find the car in the fields.&lt;/span&gt;
                  &lt;/h1&gt;
                  &lt;label&gt;
                      &lt;span&gt;Search Car :&lt;/span&gt; 
                  &lt;select name="cars"&gt;
                      &lt;option value="def" disabled="disabled" selected="selected"&gt;Please select a name&lt;/option&gt;       
                      &lt;option value="honda"&gt;Honda&lt;/option&gt;
                      &lt;option value="hyundai"&gt;Hyundai&lt;/option&gt;
                      &lt;option value="volkswagon"&gt;VolksWagon&lt;/option&gt;
                      &lt;option value="toyota"&gt;Toyota&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/label&gt;
  
              &lt;label&gt; 
                      &lt;input type="submit" name="s1" value="Search" class="button" onclick="validateForm();"/&gt;
              &lt;/label&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>and for the javascript:</p>
  
  <pre><code>&lt;script&gt;
          function validateForm()
          {       var x=document.forms["myForms"]["cars"].value;
                  switch (x)
                  {
                      case "def":
                          alert("Please choose a Car Compony");
                              break;
                      case "honda":
                              window.location = "honda.html"; 
                          return false;
                              break;
                      case 2:
                              x="Today is Tuesday";
                              break;
                      case 3:
                              x="Today is Wednesday";
                              break;
                      case 4:
                              x="Today is Thursday";
                              break;
                  }
  
  
          }
      &lt;/script&gt;
  </code></pre>
  
  <p>there is a drop down list for which after selecting the value i redirect to the required html page</p>