开发者

firefox addon page url

I have a Firefox addon, in which I have to obtain the URL of the calling web page.

My calling web page is opened as a radwindow inside default.aspx.

When I use开发者_运维百科 window.content.document.location.href, it returns the default page address.

How can I obtain the URL of the opened radwindow.


You can try with this example,

 function GetRadWindow() {   
    var oWindow = null;   
    if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog   
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well)   
    return oWindow;   
}   

GetRadWindow().BrowserWindow.location.href; 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜