开发者

open page in new instance of browser

开发者 https://www.devze.com 2023-02-21 21:51 出处:网络
please tell me how to open a page on click of hyper link in new browser instance (so that it should开发者_如何学Go not be blocked by popup blocker) in flash AS3/ javascript

please tell me how to open a page on click of hyper link in new browser instance (so that it should开发者_如何学Go not be blocked by popup blocker) in flash AS3/ javascript

Thanks


You can open on a new tab (not on a new browser!) by doing this:

var urlRequest:URLRequest = new URLRequest("http://stackoverflow.com");
navigateToURL(urlRequest, "_blank");

Please, use it wisely...


JavaScript

// spawnWindow( 'www.duh.com', 'windowRef' )
function spawnWindow(URL, Name) {
  var features = 'toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=900,height=700';
  window.open(URL, Name, features);
}

AS3 code to call JS function

var retVal:int = ExternalInterface.call("spawnWindow",address,newId);


It is impossible! Unless you use ActiveX.

0

精彩评论

暂无评论...
验证码 换一张
取 消