Hi, the method of deleting works well, but I'm having trouble with a confirm javascript to help prevent accidental deletes.
Tried this:
<script type="text/javascript">
function confirmSubmit()
{
var agree=confirm("Are you sure you want to delete?");
if (agree)
return true ;
else
return false ;
}
</script>
And on the submit button:
<input type="submit" name="submit" id="submit_<?php echo $row_rs_orderHistory['OrderID']; ?>" value="Delete" onclick="confirmSubmit()" />
My problem is that if you click "No" on the dialog, it still deletes.
Also tried an inline version
onclick="confirm('Are you sure you want to delete?');"
I searched the forum but cannot find anything that will work.
Any ideas?