window.open() works different on AJAX success [duplicate]
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: window.open(url) different behavior - same code, different timing It will be more easy for me to explain the problem if I just show you that example -> http://jsfiddle.net/RU2SM/ As you can see there are 2 buttons, one called'AJAX' and one called 'Direct'... So if you click on 'Direct' it opens window (new tab on Chrome) but if I try to make window.open() on AJAX success handler, it doesn't work same way. I'm