Testing a Redirecting page based on a JS argument
<p>I've been working on a problem. I posted my first question <a href="http://stackoverflow.com/questions/6192889/legally-avoiding-popup-blocking">HERE</a> and then again <a href="http://stackoverflow.com/questions/6223710/redirecting-page-based-on-script-outcome">HERE</a>. I think I have a working script as below. It should simply switch the selected page depending on if the browser has allowed a popup or not</p>

<pre><code>&lt;script type="text/javascript"&gt;
function openwindow() {
    var w = window.open("popup.html","interaction","resizable=0,width=800,height=600,status=0");
    if(w){window.location = "enabled.html"}
    else{window.location = "blocked.html"}
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt; 
&lt;button onclick="openwindow();"&gt;Test&lt;/button&gt;
&lt;/body&gt;
</code></pre>

<p>I've tested on IE6, Firefox, Safari &amp; Chrome but I can't cater for all the platforms, version etc. I have a test page <a href="http://rand.waysforward.com/popup_error_catch/" rel="nofollow">HERE</a>. Is it considered acceptable on this forum to ask people to give it a try? (I've checked the FAQ and I can find anything to say NO).</p>

<p>Thanks in advance
Giles</p>
