Hi
I am working on one web application. I am interested in to fetch selected tab URL. I am using Firefox browser.
I achieved this by executing below javascript statements :
/* Get the URL of page which is currently loaded in active tab */
var currentPageURl = window.top.getBrowser().selectedBrowser.contentWindow.location.href;
alert(currentPageURl);
Above statement work if page is loaded. But if I open's a new tab on Firefox browser (not entered any URL ) and executes above javascript. I am getting about:blank as a result.
I wanted to add such javascript statements which should handle such that if current page is loaded in tab then only gives URL, if page is not loaded then it should return false instead of about:blank
Your suggestions are welcome!!!
Thanks
-Pravin