Confirm pop up and pass php value to js with input image as submit
<p>Bascially when a user hits the delete button, the script must confirm from user if he wants to delete or not.  I want to pass the id of a row.  I am using input type="image" and onclick brings up the box.  How do I pass $row_id['id] to the js script.  </p>

<pre><code>&lt;script type="text/javascript"&gt;
function show_confirm()
{
var r=confirm("Do you want to delete");
if (r==true)
  {
    window.location = "delete.php";
  //alert("You pressed OK!");
  }
else
  {

  }
}
&lt;/script&gt;


&lt;input type="image" src='../images/delete.jpg' width='30px' height='30px' style="position:relative; top:0px;" onclick="show_confirm()"&gt;
</code></pre>
