Skip to main content
Second iteration. Used more standard formatting
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

An interesting fact is that the new tab can not be opened if the action is not invoked by the user (clicking a button or something) or if it is asynchronous, for example, this will NOTnot open in new tab:

$.ajax({ url: "url", type: "POST", success: function() { window.open('url', '_blank'); } }); 

But this may open in a new tab, depending on browser settings:

$.ajax({ url: "url", type: "POST", async: false, success: function() { window.open('url', '_blank'); } }); 

An interesting fact is that the new tab can not be opened if the action is not invoked by the user (clicking a button or something) or if it is asynchronous, for example, this will NOT open in new tab:

$.ajax({ url: "url", type: "POST", success: function() { window.open('url', '_blank'); } }); 

But this may open in a new tab, depending on browser settings:

$.ajax({ url: "url", type: "POST", async: false, success: function() { window.open('url', '_blank'); } }); 

An interesting fact is that the new tab can not be opened if the action is not invoked by the user (clicking a button or something) or if it is asynchronous, for example, this will not open in new tab:

$.ajax({ url: "url", type: "POST", success: function() { window.open('url', '_blank'); } }); 

But this may open in a new tab, depending on browser settings:

$.ajax({ url: "url", type: "POST", async: false, success: function() { window.open('url', '_blank'); } }); 
Copy edited.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

InterestingAn interesting fact is that the new tab can not be opened if the action is not invoked by the user (clicking a button or smthsomething) or if it is asynchronous, for example, this will NOT open in new tab:

$.ajax({ url: "url", type: "POST", success: function() { window.open('url', '_blank'); } }); 

But this may open in a new tab, dependsdepending on browser settings:

$.ajax({ url: "url", type: "POST", async: false, success: function() { window.open('url', '_blank'); } }); 

Interesting fact is that new tab can not be opened if action is not invoked by user (clicking a button or smth) or if it is asynchronous, for example, this will NOT open in new tab:

$.ajax({ url: "url", type: "POST", success: function() { window.open('url', '_blank'); } }); 

But this may open in new tab, depends on browser settings:

$.ajax({ url: "url", type: "POST", async: false, success: function() { window.open('url', '_blank'); } }); 

An interesting fact is that the new tab can not be opened if the action is not invoked by the user (clicking a button or something) or if it is asynchronous, for example, this will NOT open in new tab:

$.ajax({ url: "url", type: "POST", success: function() { window.open('url', '_blank'); } }); 

But this may open in a new tab, depending on browser settings:

$.ajax({ url: "url", type: "POST", async: false, success: function() { window.open('url', '_blank'); } }); 
Source Link
karaxuna
  • 26.9k
  • 13
  • 86
  • 120

Interesting fact is that new tab can not be opened if action is not invoked by user (clicking a button or smth) or if it is asynchronous, for example, this will NOT open in new tab:

$.ajax({ url: "url", type: "POST", success: function() { window.open('url', '_blank'); } }); 

But this may open in new tab, depends on browser settings:

$.ajax({ url: "url", type: "POST", async: false, success: function() { window.open('url', '_blank'); } });