delete prompt box is not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anarkha
    New Member
    • May 2014
    • 6

    delete prompt box is not working

    Code:
    "Delete" : function() {
    
    					var result = prompt("Want to delete?");
    				if (result==true) {
    					deleteUser(userId);
    			}
    
    
    				},
    Last edited by Dormilich; May 18 '14, 07:28 PM.
  • stdq
    New Member
    • Apr 2013
    • 94

    #2
    I think the call to prompt should be:
    Code:
    var result = window.prompt( "Want to delete?" )
    Also, anything the user enters that is not an empty string (or null, if that's possible to be entered) will be considered true.

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      hm, why do you use a prompt() when a confirm() would be the obvious choice?

      Comment

      • Anarkha
        New Member
        • May 2014
        • 6

        #4
        how to make the confirm box as center of the page in all browsers.

        Comment

        • Anarkha
          New Member
          • May 2014
          • 6

          #5
          In this code pop-up looks fine but delete fn not working.

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            how to make the confirm box as center of the page in all browsers
            you make your own confirm box as you have no influence over how browsers implement the native confirm box.

            Comment

            Working...