Redirect to a dynamic page with Javascript
<p>This is what I am trying to do:</p>

<pre><code>function show_confirm()
{
var r=confirm("Are you sure you want to delete this record?");
if (r==true)
  {
  window.location = "delete.php?case=&lt;?php echo $case; ?&gt;";
  }
else
  {
  window.close() 
  }
}

&lt;input type="image" src="images/delete.gif" name="image" onclick="show_confirm()"&gt;
</code></pre>

<p>But it redirects here:
<a href="http://localhost/delete.php?case=" rel="nofollow">http://localhost/delete.php?case=</a></p>

<p>When it should redirect here:
localhost/delete.php?case=$case</p>

<p>*could not edit previous post</p>
