title: Document.Open() is not work
body: <p>So, I have a button where if the person's username and password is correct, it will notify you, then it will redirect to another page. The first thing works, but it will not redirect you to the page.</p>
  
  <p>Here is the code of the webpage:</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Siur&lt;/title&gt;
  &lt;script type="text/javascript"&gt;
  ///////////////////////////Login System///////////////////////////
  function getCookie(){
    var whole, username, password, splitting, actual,user, pass;
    whole = document.cookie;
    whole = whole.split(';');
    username = whole[0];
    password = whole[1];
    actual = password.split('=');
    user = actual[0];
    pass = actual[1];
    alert(user + password);
  }
  
  function setCookie(c_name,value,exdays){
    var c_value=value + "; 
    pass="+document.getElementById('passwordText').value;
    document.cookie="=" + value + "; 
    pass="+document.getElementById('passwordText').value;
    alert(document.cookie);
    getCookie();
  }
  
  function url(url){
    document.open(url);
  }
  
  function checkCookie(){
    var whole, username, password, splitting, actual,user, pass;
    whole = document.cookie;
    whole = whole.split(';');
    username = whole[0];
    password = whole[1];
    actual = password.split('=');
    user = actual[0];
    pass = actual[1];
    if (document.getElementById('usernameText').value !=null &amp;&amp;
        document.getElementById('usernameText').value!="" &amp;&amp;
        document.getElementById('passwordText').value == pass) {
      alert("Welcome again " + user);
      document.open('search_webpage.html');
    }
    else{
      alert('Incorrect username or password.');
    }
  }
  //////////////////////////////End of Login system////////////////////////////////////
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;table width=100% height=30 background="nav.png" border="0"&gt;
    &lt;tr&gt;
      &lt;td &gt;
          &lt;form id="form1" name="form1" method="post" action=""&gt;
            &lt;label for="searchBox"&gt;&lt;/label&gt;
            IN-DEV 0.1
  
          &lt;/form&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;img src="logo.png" width="206" height="147" /&gt;
    &lt;p&gt;-Where everything is at your finger tips-&lt;/p&gt;
    &lt;p&gt;
      &lt;label for="usernameText"&gt;&lt;label&gt;Username: &lt;/label&gt;&lt;/label&gt;
      &lt;input type="text" name="usernameText" id="usernameText" /&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;label for="passwordText"&gt;&lt;label&gt;Password: &lt;/label&gt;&lt;/label&gt;
      &lt;input type="password" name="passwordText" id="passwordText" /&gt;
    &lt;/p&gt;
  &lt;/center&gt;
  &lt;center&gt;
  
  &lt;input type="submit" name="create" id="create" onclick="checkCookie()" value="Login" /&gt; 
  &lt;input type="submit" name="check" id="check" onclick="setCookie(
   document.getElementById('usernameText').value,
   document.getElementById('passwordText').value,365);" value="Register" /&gt;
  &lt;/p&gt;
    &lt;p&gt;&lt;a href="http://blacklist.eff.org/"&gt;Fight SOPA now!&lt;/a&gt;&lt;/p&gt;
  
    &lt;p&gt;&lt;!--[if lt IE 7]&gt; 
    &lt;div style=' clear: both; height: 59px; padding:0 0 0 15px; position: relative;'&gt; &lt;a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode"&gt;
    &lt;img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /&gt;
    &lt;/a&gt;&lt;/div&gt; &lt;![endif]--&gt;&lt;footer&gt;&lt;font color="#CCCCCC"&gt;Copyright 2012, All Rights Reserved.&lt;/font&gt;&lt;/footer&gt;&lt;/p&gt;
  &lt;/center&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>