How To Generate Popup After Ajax Call
I want to generate a popup after an ajax call. My current code (below) creates a new tab and not alert box. $.ajax ({ type: 'POST', url: 'addDayData.php', data: TblData
Solution 1:
Better to open a 'html form in popup': On success $( "#dialog-form" ).dialog( "open" );
Solution 2:
you should use alert()
instead of window.open()
$.ajax
({
type: "POST",
url: "addDayData.php",
data: TblData,
async: false,
success: function (data) {
alert("POPUP");
}
});
Solution 3:
Solution 4:
you should check for other window.open
parameter
$.ajax({
type: "POST",
url: "addDayData.php",
data: TblData,
async: false,
success: function (data) {
window.open("addnewexcursion.php", "myWindow","width=200,height=100");
}
});
Solution 5:
to open new pop-up use
window.open('www.yourUrl.com','name','height=200,width=150')
specify width and height for window.open
, this will open up a new pop-up window.
NOTE : Pop-ups are subjected to be blocked based on browser's configuration
Post a Comment for "How To Generate Popup After Ajax Call"