I know this is a little long, but it's an interesting problem (I think), so please bear with me.
Statement of Problem/Facts:
1) I am tasked with creating a stand-alone program to assist folks identify reference material.
2) The user will select the references needed and the program will store "batches" of them for the user.
3) The user will then use their stored batches to access the reference material through a browser. (So, obviously, the batch is really just a collection of weblinks.)
4) Here's the kicker 1. Ideally, when the user wants access to these links, they want them to all open at once--ideally in tabs, although several windows would be workable.
5) Here's kicker 2. Ideally, the program should launch the browser for them.
6) Note that these users constitute a limited pool folks who will know in advance how this system is supposed to work--it's not targeting the general unsuspecting public (i.e., no pop-up floods).
7) The project is currently limited to the WIndows platform, but could still involve multiple browsers.
Progress/Problems to date:
1) A prototype of the program has been developed. It successfully generates and maintains the list of links (Yes, I know, this was the easy part).
2) For IE7, the prototype can generate a temp file containing JScript/VBScript that will successfully launch IE and open each link in a background tab--limited success for kicker 1. (See sample code.)
3) Unfortunately, I can't get the prototype to execute the .js file, so the program can't open the browser tabs for the user--failed to accomplish kicker 2.
4) Failure 3--js won't work with other browsers, as far as I know. So, this isn't the best solution anyway.
5) It may be that we need to have the user indicate to the program which browser they are using so that we can implement several different strategies. But it would be better to find one scripting solution that would support the majority of browsers--or at least the most popular. If we implement different strategies, then I still need to be able to execute .js files from within a program (need another forum?), or come up with a better scripting solution that accomplish both kickers.
Comments:
I was originally hoping that this could be accomplished using HTML (or variants) for ease in supporting various browsers. But, after discussions on several forums, it was suggested that JavaScript might be the way to go. It would be nice if only one solution was devised, so I'm hoping that javascript will come to the rescue. (We can always advise users in advance of the browser settings and other requirements needed, if we have to.)
I've poked around several scripting forums looking for a way to automatically open multiple links, say in a loop that might execute onOpen, but didn't find anything. Maybe it can't be done (don't believe that) or maybe I just didn't look in the right places.
Seeking ya'lls expert advise. I'm a bit script-ignorant.
Thanks, Mark.
Statement of Problem/Facts:
1) I am tasked with creating a stand-alone program to assist folks identify reference material.
2) The user will select the references needed and the program will store "batches" of them for the user.
3) The user will then use their stored batches to access the reference material through a browser. (So, obviously, the batch is really just a collection of weblinks.)
4) Here's the kicker 1. Ideally, when the user wants access to these links, they want them to all open at once--ideally in tabs, although several windows would be workable.
5) Here's kicker 2. Ideally, the program should launch the browser for them.
6) Note that these users constitute a limited pool folks who will know in advance how this system is supposed to work--it's not targeting the general unsuspecting public (i.e., no pop-up floods).
7) The project is currently limited to the WIndows platform, but could still involve multiple browsers.
Progress/Problems to date:
1) A prototype of the program has been developed. It successfully generates and maintains the list of links (Yes, I know, this was the easy part).
2) For IE7, the prototype can generate a temp file containing JScript/VBScript that will successfully launch IE and open each link in a background tab--limited success for kicker 1. (See sample code.)
Code:
var navOpenInBackgroundTab = 0x1000;
var oIE = new ActiveXObject("InternetExplorer.Application");
oIE.Navigate2("[URL unfurl="true"]http://www.site1.com");[/URL]
oIE.Navigate2("[URL unfurl="true"]http://www.site2.com",[/URL] navOpenInBackgroundTab);
oIE.Navigate2("[URL unfurl="true"]http://www.site3.com",[/URL] navOpenInBackgroundTab);
oIE.Visible = true;
4) Failure 3--js won't work with other browsers, as far as I know. So, this isn't the best solution anyway.
5) It may be that we need to have the user indicate to the program which browser they are using so that we can implement several different strategies. But it would be better to find one scripting solution that would support the majority of browsers--or at least the most popular. If we implement different strategies, then I still need to be able to execute .js files from within a program (need another forum?), or come up with a better scripting solution that accomplish both kickers.
Comments:
I was originally hoping that this could be accomplished using HTML (or variants) for ease in supporting various browsers. But, after discussions on several forums, it was suggested that JavaScript might be the way to go. It would be nice if only one solution was devised, so I'm hoping that javascript will come to the rescue. (We can always advise users in advance of the browser settings and other requirements needed, if we have to.)
I've poked around several scripting forums looking for a way to automatically open multiple links, say in a loop that might execute onOpen, but didn't find anything. Maybe it can't be done (don't believe that) or maybe I just didn't look in the right places.
Seeking ya'lls expert advise. I'm a bit script-ignorant.
Thanks, Mark.