Below pasted code I use for posting data. The response opens in a new tab.
GF.SubmitForm = function (url, params, target) {
// create form string using array push and join
var form = ['<form method="POST" action="', url, '" target="', target, '">'];
for (var key in params)
form.push('<input type="hidden" name="', key, '" value="', params[key], '"/>');
form.push('</form>');
jQuery(form.join('')).appendTo('body')[0].submit();
}
What should I do to make this code open, the response data, in a new popup window.
Replaced the last line of code in the above function with the below pasted code but didn't work
jQuery(form.join('')).appendTo('body')[0].submit(function () {
window.open(url,target,"menubar=1,resizable=1,width=350,height=250");
});