1
votes

I am using window.open('http://www.google.com','_blank') inside Ajax success.In chrome, new window is opened instead of new tab. But when I called window.open outside the Ajax, it opens new tab.Please anyone explain why its happening so.

1
my guess is that chrome treats any window.open as a pop-up unless it was called in code that was directly triggered by a click. Since the succes of the ajax request was triggered by the HTTP response, and not a click it treats it as a pop-upThayne

1 Answers

0
votes

Try out this code or paste your code for more help

javascript:window.open("http://www.google.com","_blank");