title: username and password validation in HTML
body: <p>The code below is supposed to validate the username and password and if correct should run "run.html" else run "fail.html",But the code is not executing as required.What is the error in the code?</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
      &lt;form&gt;
  
      &lt;font size=5&gt;&lt;font color="black"&gt;&lt;input type="text" placeholder="Username" name="text1"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;
  
      &lt;font size=5&gt;&lt;font color="white"&gt;&lt;input type="password" placeholder="Password" name="text2"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;
  
      &lt;font size=5&gt;&lt;input type="submit" value="Login"  onclick=javascript.validate(test1.value,test2.value)&gt;&lt;/font&gt;
  
      &lt;/form&gt;
  
  &lt;! javascript&gt;
  &lt;script language="javascript"&gt;
  function validate(text1,text2)
  {
      if(text1==workshop &amp;&amp; text2==workshop)
      load("run.html");
      else
      {
          load("fail.html");
      }
  }
  function load(url)
  {
      location href=url;
  }
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>