title: Open Another Page - HTML/Javascript
body: <p>This is my whole html code, 
  I do not understand why it does not open "example.html" page.
  if someone can help me understand why.
  I would like to make sure that when the credentials are correct and I press the login button it directs me to a new file (in this case "example.html"), but I do not know why nothing happens</p>
  
  <pre><code>&lt;html&gt;
  
  &lt;head&gt;
      &lt;title&gt;Login&lt;/title&gt;
      &lt;link rel="stylesheet" href="css/css1.css"&gt;
      &lt;script type="text/javascript"&gt;
          var message = "Right Click Disabled!";
  
          function rtclickcheck(keyp) {
              if (navigator.appName == "Netscape" &amp;&amp;
                  keyp.which == 3) {
                  alert(message);
                  return false;
              }
              if (navigator.appVersion.indexOf("MSIE") != -1 &amp;&amp; event.button == 2) {
                  alert(message);
                  return false;
              }
          }
          document.onmousedown = rtclickcheck;
  
          function check(form) {
              if (form.username.value == "admin" &amp;&amp; form.password.value == "123") {
                  window.open("example.html")
              } else {
                  alert("Username Or Password Doesn't Match!");
              }
          }
      &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;div class="form-box"&gt;
          &lt;div class="head"&gt;LOGIN&lt;/div&gt;
          &lt;div id="textbox"&gt;
              &lt;form&gt;
                  &lt;input type="text" placeholder="Username" name="username"&gt;
                  &lt;br&gt;
                  &lt;input type="password" placeholder="Password" name="password"&gt;
                  &lt;br&gt;
                  &lt;input type="submit" onclick="check(this.form)" name="btn_submit" value="Login"&gt;
              &lt;/form&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>