Hi,
I can make a confirmation script redirected to the a page I need with the script bellow, but the variables I want to carry out with it do not pass. How do I solve this problem.
<script type="text/javascript">
<!--
function confirmation() {
var answer = confirm("Are you sure you want to delete the item?");
if (answer){
alert("Removing the item!");
window.location = "delete.php";
return true;
} else {
alert("Some items worth keeping!");
return false;
}
}
//-->
</script>
<form method='post'>
<input type='hidden' name='id' value='<?php echo $row['id']; ?>' />
<input type='hidden' name='name' value='<?php echo $row['name']; ?>' />
<input type='image' src='images/delete.png' onclick='confirmation(); return false' title='delete item' />
</form>
Thanks so much