Querying String Values in Pure JavaScript AND Opening a Dialog Box
<p>OK, I found this code on another thread </p>

<p><a href="http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values">How can I get query string values?</a>, and it's been very helpful in location a string value in a URL.  Now I need to take that string value, and use it to open a dialog box.</p>

<p>Here is the original code to get the string value</p>

<pre><code> function getParameterByName( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&amp;]"+name+"=([^&amp;#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
</code></pre>

<p>and here is the code I've written to search for the string, and open the dialog box, and yet it is not doing that.</p>

<pre><code>var signup_param = getParameterByName( 'Redirect' );
if (signup_param == "signup") {
$('#emailDuplicateDialog').dialog('open');
}
</code></pre>

<p>The URL I'm working with btw ends with login.html?redirect=signup so redirect is the name, and signup is the value.</p>

<p>Any suggestions on changes to make this work would be a great help.</p>

<p>Thanks.</p>
