Ali
Ali

Reputation: 63

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.

Upvotes: 1

Views: 308

Answers (1)

jumperchen
jumperchen

Reputation: 1473

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; 

Upvotes: 1

Related Questions