javascript - How to open a new browser tab from within a jQuery callback -


i have tried following achieve this:

but neither works when calling window.open inside callback. here's code

$.post('api', {      }, function() {     var win = window.open('target-file', '_blank');     win.focus();     }); 

try name of window

like

window.open("url", "nameofnewwindow"); 

see here


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -