JavaScript Reload Page Script
<pre><code>&lt;html&gt;
    &lt;head&gt;
        &lt;script type="text/javascript"&gt;
            function show_confirm(){
                var r=confirm("Hello or Goodbye?");
                if (r==true){
                    alert("Hello");
                    window.location.replace("http://www.google.com/");
                } else {
                    alert("Goodbye");
                }
            }
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;input type="button" onclick="show_confirm()" value="Show a confirm box" /&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I'm learning JavaScript, and I'm using W3School's Tryit Editor, and this code wasn't working like I hoped. I want it to redirect me to google after someone hits 'OK' twice, but it doesn't seem to work. Can someone help me out?</p>
