Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open new window in Netscape from IE 1

Status
Not open for further replies.

emerickson

Technical User
Jul 3, 2003
8
DE
Hello,

My company has an intranet where all users have the same version of IE and Netscape. Everybody uses IE for our web based reports and company pages. However, there is one website (for GUI) that some employees use that can only be viewed in Netscape.

I have a page with a bunch of "helpful links" for the employees to use for quick reference. The page is opened by the users in IE. But now I need an onClick event, or something like it, to open the GUI website in Netscape (coming from my IE Helpful Links page).

Hope this makes sense!
Thanks,
Eva
 
nope thats not possible, u can simply give them a warining that they are using IE, but it stops there...

Known is handfull, Unknown is worldfull
 
Most things in the programming world are "POSSIBLE" it all depends on how much time you want to invest and documentation.

The below code will open up Netscape:

<script language=&quot;javascript&quot;>
function Test() {
var shell = new ActiveXObject(&quot;WScript.shell&quot;);
shell.run(&quot;netscp.exe&quot; );
}
</script>

For testing adda button to a form and add code to the buttons onclick event to call the above function. One thing to remember is that this will become a real security issue with the users if they can create active x components and access their Netscape exe on there drives. But play around with it, look up netscape to find what parameters you need to pass to the program to open up the right HTMl page.

Have fun.

MrGreed

&quot;did you just say Minkey?, yes that's what I said.&quot;
 
Mr.Greed, well said, but i havent yet accepted COM in JS as it doesnt work in many browsers...

Known is handfull, Unknown is worldfull
 
Hello MrGreed,

I tried it (with a link instead of a button, but still with the onCLick event) and I get an error: Automation server can't create object. Any idea why. Or any other idea of how to solve the problem?
Thanks,
Eva
 
You'll have to set your internet security in the browser lower. You should be prompted that an Active x control is trying to run, and answer yes/no. Do you get that prompt?

MrGreed

&quot;did you just say Minkey?, yes that's what I said.&quot;
 
Hello MrGreed,

I think I went 1 step forward and 2 back. The thing with the security settings worked, I am now getting the active x window and when I click yes it opens netscape - and then it opens also an IE window with the link it is supposed to go to! So I think there is still something in my code that tells it to go to IE. Could you, please, have a look at my code?

<script language=&quot;javascript&quot;>
function popUp1(URL) {
var shell = new ActiveXObject(&quot;WScript.shell&quot;);
shell.run(&quot;netscp.exe&quot; );
day = new Date();
id = day.getTime();
eval(&quot;page&quot; + id + &quot; = window.open(URL, '&quot; + id + &quot;', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=800,height=600,left = 0,top = 0');&quot;);

}
</script>

Basically, it is just supposed to open Netscape and then go to a specific link (which is passed on to the function) in netscape.

Thanks for all your help!
Eva
 
Opening a window from the Javascript function &quot;popUp1()&quot; will still use IE because its in an IE browser window, what you need to do is find out how to pass along with the exe call the url to open in Netscape.

The url will be some parameter when you call the netscape exe.

Your Code: shell.run(&quot;netscp.exe&quot; );

Fake Example:

shell.run(&quot;netscp.exe <some kind of paramaters>&quot; );


You'll need to check for parameters that can be passed to the Netscape exe, try a search on the web or Netscape website.

MrGreed

&quot;did you just say Minkey?, yes that's what I said.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top