pkarpenko
February 13th, 2008, 01:25 PM
I need to be able to control window parameters (size, toolbars, etc) of the browser windows I open from my SWF, so I'm calling a javascript function in the HTML page that holds my SWF by using
ExternalInterface.call("OpenPage", url, win_name, win_params);
The JS function is very simple:
function OpenPage(strUrl, target, params) {
if (!params) params = '';
var win = window.open(strUrl, target, params);
win.focus();
}
The problem is that no matter what target (win_name) I specify, it ALWAYS opens a new window. I've tried hardcoding the open call with window.open(strUrl, 'SAME', params); with no luck.
If I call the JS function from the HTML page, it works fine. Somewhere between the SWF and the JS, the window referencing gets messed up.
Anyone else encounter this or have any ideas?
ExternalInterface.call("OpenPage", url, win_name, win_params);
The JS function is very simple:
function OpenPage(strUrl, target, params) {
if (!params) params = '';
var win = window.open(strUrl, target, params);
win.focus();
}
The problem is that no matter what target (win_name) I specify, it ALWAYS opens a new window. I've tried hardcoding the open call with window.open(strUrl, 'SAME', params); with no luck.
If I call the JS function from the HTML page, it works fine. Somewhere between the SWF and the JS, the window referencing gets messed up.
Anyone else encounter this or have any ideas?