I am using Pjax in a Yiii2 project.
I am testiing an "Export" button to reload a gridview with extra parameters.
The gridview loads as expected, however Pjax does not fire any events such as "complete", "end", "success" etc.
The alert in the below example does not fire, no matter which event is used:
$("#export-button").click(function() {
$.pjax.reload({container:"#w0",
timeout: false,
complete: function() {
alert("success");
},
data: $("#labelForm").serialize()+"&export=true&class=label",
});
return false;
});
Does anybody have a solution for this? I need to initiate a redirect after the grid has reloaded.