Do not close ipromptu on click save button

32 Views Asked by At

I am using ipromptu dialog box where I want when I click save button then it match condition and if condition then ipromptu should be closed else it should not be closed. Here's my code.

$.prompt(data, {
    title:'Reason for Exit',
    buttons: { 
        "Save": true, 
        "Skip": false 
    }, submit: function(e, v, m, f) {
        if (v) {            
            var reason = $("#reason").val();
            var id = $("#exitfrom").val();

            if (reason == 1) {
                ShowMessage('Please Select any on.', true);
                valid = false;
                alert();
            } else {
                alert("hello");
            }
        } else {
            $.prompt.close();
        }           
    }
});
0

There are 0 best solutions below