Solved

list of the currently open Internet Explorer windows

Posted on 2003-12-12
7
204 Views
Last Modified: 2006-11-17
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?
0
Comment
Question by:davepusey
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 11

Expert Comment

by:shmert
Comment Utility
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.
0
 
LVL 2

Author Comment

by:davepusey
Comment Utility
>> for security reasons in javascript

I wanna do it in PHP not javascript!
0
 
LVL 13

Expert Comment

by:lozloz
Comment Utility
it'd be impossible with php (server side language) for sure and as shmert said, you can't do it in jscript
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 11

Accepted Solution

by:
shmert earned 500 total points
Comment Utility
Because PHP is all happening server-side, and doesn't know anything about the browser (just what the browser sends in the HTTP request, which doesn't include a list of open windows).
0
 
LVL 2

Author Comment

by:davepusey
Comment Utility
Is there any language (server or client side) that will do it?
0
 
LVL 13

Expert Comment

by:lozloz
Comment Utility
not to my knowledge, shmert's suggestion of a browser plugin seems to be the only way

loz
0
 
LVL 11

Expert Comment

by:Zontar
Comment Utility
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.href + "</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.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now