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

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

Bubble Sort Manually a Linked List in Java -

asp.net mvc - SSO between MVCForum and Umbraco7 -