php - Delete Confirmation when click on link -
i have code inside while
loop fetching data database. want show confirmation popup when delete
link clicked.
echo "<td><a href='delete.php?id=" . $row['serial_no'] . "'>delete</a></td>";
how can done?
try out confirm
function javascript, learn jquery fast possible , try seperate javascript html ;).
http://www.w3schools.com/jsref/met_win_confirm.asp
<td> <a href="delete.php?id=<?php echo $row['serial_no'] ?>" id="a_id"> delete </a> </td> <script type="text/javascript"> $(function() { $('td a#a_id').click(function() { return confirm("are sure want delete this?"); }); }); </script>
Comments
Post a Comment