views:

60

answers:

2

How to develop confirmation dialog with yes no button using jquery or any other method ? I need that confirmation when I click on submit button.

+1  A: 

Use the native browser confirm dialog.

if(confirm("Are you sure?"))
{
    //Ok button pressed...
}
else
{
    //Cancel button pressed...
}
mck89
A: 

I have a solution, it is working for me, but not sure it is the right method.

     $.alerts.okButton = ' Yes ';
     $.alerts.cancelButton = ' No ';                  
       jConfirm('Are you sure??',  '', function(r) {
         if (r == true) {                    
            //Ok button pressed...
         }  
       }