php - JavaScript pop box won't work properly -
i have problem script. when press 'yes' deletes user fine. problem still deletes user when click cancel. ideas?
<script> function myfunction() { var x; if (confirm("are want delete user ?") == true) { x = "delete.php"; } else { x = "memberlist.php"; } document.getelementbyid("demo").innerhtml = x; } </script>
the mentioned javascript works fine. may there issue in delete.php or memberlist.php code. solution per expectations, please provide code delete.php , memberlist.php.
Comments
Post a Comment