Possible Duplicate:
window.open(url) different behavior - same code, different timing
I'll let my code snippet explain the issue I'm seeing.
function myFunction() {
window.open('http://www.yahoo.com'); // --> this opens a new tab on my browser
Ext.Ajax.request({
url: 'PHP function call',
success: function(response) {
window.open('http://www.yahoo.com'); // --> this opens a new window, not tab
}
});
}
This is very strange. From researching this issue, I understand there currently exists no way to force a browser tab to open instead of a browser window. That being said, I'm still wondering if there's any workaround. The way my app is designed, every time I call window.open() a tab is opened except for this one case and therefore my clients find it very annoying. Any insight would be greatly appreciated.
In addition to Justin's suggestion below I also tried the following:
function myFunction() {
var myWin = window;
myWin.open('http://www.yahoo.com'); // --> this opens a new tab on my browser
Ext.Ajax.request({
url: 'PHP function call',
success: function(response) {
myWin.open('http://www.yahoo.com'); // --> this opens a new window, not tab
}
});
}