I have written an ajax function where I want to display confirmation meeessage before submitting the form. How should I add with my condition. Below is my code.
ajax
Maybe this exemple is what you need ?
var r = confirm("Press a button!"); if (r == true) { // Make your ajax call here } else { // He refused the confirmation }
Call your confirm before ajax call ?