I am trying to get the result of submit() from an editor call to cause a window.open() to get the result of the GET call to an URL.
Here is what I have that does the GET request, but of course datatables is waiting for the json response which won't happen.
In fact what will happen is that the URL I want to GET towards will create a PDF and send that to the new window.
var labeleditor = new $.fn.dataTable.Editor( {
"ajax": {
"url": "pdf/label.php",
"type": "GET",
},
"formOptions": {
main: {
blurOnBackground: false
}
},
"fields": [
{
"name": "printrun",
"label": "Enter the Number of Labels to Print"
}
],
i18n: {
create: { title: "Print Blank Valve Labels" }
}
});
So my PHP script at pdf/label.php can receive the $_GET string no problem and decodes the value supplied for "printrun", and even generates the PDF file as required.
But I want a new browser window - I assume via window.open(), to capture the generated PDF result, not ajax like a normal DT operation.
thanks.