Solution 1 :

This should work:

var tab ='about:blank', '_blank');


Problem :

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


Comment posted by mplungjan

Why Ajax?? If you want to open a page in a new window, use a link to the source of the HTML and

Comment posted by anwesh mohapatra

Unfortunately I can only share an api. How do I trigger javascript on client side then?

Comment posted by mplungjan

If you can do console.log you can do what is suggested in the answer too

Comment posted by anwesh mohapatra

I can only give them the rest api. How can I call the javascript you wrote in that situation?


Leave a Reply

Your email address will not be published. Required fields are marked *