This should work:
var tab = window.open('about:blank', '_blank');
tab.document.write(data);
tab.document.close();
This should work:
var tab = window.open('about:blank', '_blank');
tab.document.write(data);
tab.document.close();
I have an ajaxcall which returns an html page to me in the response. I want to open this in a new window. How to make this work?
console.log(data)
basically prints the entire html content as if it were a single string
Why Ajax?? If you want to open a page in a new window, use a link to the source of the HTML and
Unfortunately I can only share an api. How do I trigger javascript on client side then?
If you can do console.log you can do what is suggested in the answer too
I can only give them the rest api. How can I call the javascript you wrote in that situation?