-
1. Re: How to Pop-Up: "Are you sure you want to delete this record?"
Nancy O. Jul 15, 2014 1:31 PM (in response to Max Resnikoff)I use a simple confirm/alert box.
<script>
//alert on delete
function confirm_alert(node) {
return confirm("You are about to permanently delete a product. Click OK to continue or CANCEL to quit.");
}
</script>
Nancy O.
-
2. Re: How to Pop-Up: "Are you sure you want to delete this record?"
Max Resnikoff Jul 15, 2014 1:37 PM (in response to Nancy O.)where would i place that?
My button script is below:
<input type="submit" name="deleteequip" id="deleteequip" value="Delete Item">
-
3. Re: Re: How to Pop-Up: "Are you sure you want to delete this record?"
Nancy O. Jul 15, 2014 1:51 PM (in response to Max Resnikoff)I have mine set up a little differently. I have a manage records page with a link to my delete_product.php script. When they click that link, the alert/confirm function is invoked. If they hit OK, the delete_product.php script runs its routine. If they hit CANCEL, that link is aborted.
<a class="button" onclick="return confirm_alert(this);" href="delete_product.php?PRODID=<?php echo $row_get_products['PRODID']; ?>">DELETE</a>
<script>
//alert on delete
function confirm_alert(node) {
return confirm("You are about to permanently delete a product. Click OK to continue or CANCEL to quit.");
}
</script>
Nancy O.
-
4. Re: How to Pop-Up: "Are you sure you want to delete this record?"
Max Resnikoff Jul 15, 2014 2:17 PM (in response to Nancy O.)I dont know what im doing wrong!
'deleteequip.php'
<script>
//alert on delete
function confirm_alert(node) {
return confirm("You are about to permanently delete a product. Click OK to continue or CANCEL to quit.");
}
</script>
equipmentinventory.php:
<a class="button" onclick="return confirm_alert(this);" href="deleteequip.php?id=<?php echo $row_get_invlist['id']; ?>">DELETE</a>
-
5. Re: How to Pop-Up: "Are you sure you want to delete this record?"
osgood_ Jul 15, 2014 10:30 PM (in response to Max Resnikoff)Max Resnikoff wrote:
I dont know what im doing wrong!
'deleteequip.php'
<script>
//alert on delete
function confirm_alert(node) {
return confirm("You are about to permanently delete a product. Click OK to continue or CANCEL to quit.");
}
</script>
equipmentinventory.php:
<a class="button" onclick="return confirm_alert(this);" href="deleteequip.php?id=<?php echo $row_get_invlist['id']; ?>">DELETE</a>
The <script> </script> needs to go in the same page as the delete link NOT in the 'deleteequip.php' page


