I want to display a message in confirm dialog in javascript without using html or any other -


i want display message "do want delete?" in confirm dialog.

i had given message in data content, not working.

how can using javascript ?

here code :

function confirmdelete ( ) {    $(function() {      $( "#dialog-confirm" ).dialog({       data : "do want delete?",       resizable: false,       height:140,       modal: true,       buttons: {         "yes": function() {             $(this).load("./removeagent.action?id="+a,  function() {                 $("#agentresult").trigger("reloadgrid");             });             $(this).dialog("close");         },         "   no    ": function() {             $(this).dialog("close");         }       }     }); }); 

}

try method in onclick listener,

    <script>         function clickaction() {         var result;         var buttonpressed=confirm("button press");         if (buttonpressed==true) {           result="ok";           }         else {           result="cancel";           }         document.getelementbyid("demo").innerhtml=result;         }     </script> 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -