Dave Pusey
asked on
list of the currently open Internet Explorer windows
This is what I want to do...
Populate a listbox with a list of the currently open Internet Explorer windows.
When you choose one from the list, the value of the address bar of the window you selected from the list in submitted as form data to another php page.
...but I aint sure how to do it?
Populate a listbox with a list of the currently open Internet Explorer windows.
When you choose one from the list, the value of the address bar of the window you selected from the list in submitted as form data to another php page.
...but I aint sure how to do it?
Can't be done (without a browser plugin), for security reasons in javascript. A given window at a URL can't access the other window locations or content, because that would allow malicious sites to get your banking info, for example.
ASKER
>> for security reasons in javascript
I wanna do it in PHP not javascript!
I wanna do it in PHP not javascript!
it'd be impossible with php (server side language) for sure and as shmert said, you can't do it in jscript
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Is there any language (server or client side) that will do it?
not to my knowledge, shmert's suggestion of a browser plugin seems to be the only way
loz
loz
You can do something like this in JS if you've opened the windows using JS and named them, by testing for each valiable created by window.open(). The best way to do this would be to assign each new instance to an array:
// creating new windows...
var theWindows = new Array();
theWindows[0] = window.open(...);
theWindows[1] = window.open(...);
theWindows[2] = window.open(...);
// etc.
// testing to see which windows are open...
for(var i = 0; i < theWindows.length; i++)
{
if(theWindows[i] && !theWindows[i].closed)
output += "<option value=\"" + theWindows[i].name + "\">" + theWindows[i].location.hre f + "</option>\n";
}
// or whatever...
Not sure if this will actually work or not, but you can give it a go.
As for windows you yourself didn't open via script -- no way, José, you're SOL. And I sure as heck would NOT install a plugin that circumvented this.
// creating new windows...
var theWindows = new Array();
theWindows[0] = window.open(...);
theWindows[1] = window.open(...);
theWindows[2] = window.open(...);
// etc.
// testing to see which windows are open...
for(var i = 0; i < theWindows.length; i++)
{
if(theWindows[i] && !theWindows[i].closed)
output += "<option value=\"" + theWindows[i].name + "\">" + theWindows[i].location.hre
}
// or whatever...
Not sure if this will actually work or not, but you can give it a go.
As for windows you yourself didn't open via script -- no way, José, you're SOL. And I sure as heck would NOT install a plugin that circumvented this.