Forum Discussion

hcavazos's avatar
hcavazos
New Contributor
10 years ago

How to get URL from a tab created dynamically using chrome browser? I am using Jscript...

Hi there!,

 

When I click on a html button, a XML is dynamically created in another tab, so I am trying to get the URL from this new tab, is there a way to change focus on this new tab and get its URL?

 

Thanks,

Hector Cavazos

1 Reply

  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor
    var wshell = new ActiveXObject('WScript.Shell');
    var allpages = Sys.Browser("chrome").FindAllChildren(["Name"],["Page*"],1).toArray();
    for (var page = 0;page < allpages.length;page++) {
      wshell.popup(allpages[page].url);
    }

     Not sure if there is an easier way but...wrote this for you.