I'm sending <form> data through ajax in bootstrap modal. How do I make the modal window open until a value has returned and then display a notification <div>?
The notification div will display form validation, and to manually close the modal the user needs to click the close button, or outside the modal window.
Below is my code, simplified version:
$.post(url, {
data:data }
,function(html){
if(html==1){
//show <div class="A"> here
}
else{
//show <div class="B"> here
}
});
$("#myModal").modal("show");. To show thedivyou could use$(".A" ).show();. - Matthew Johnson