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

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -