in reply to Open another IE browser window from CGI

It looks like you don't understand the web at all.

see this for a very short introduction.

The CGI/whatever webserver code does not run on the browser, or the browser's system. It runs on whatever machine you've installed your CGI code on. In general the only code that will run on the browser itself is Javascript.

In other words, you can't use $^O in server-side perl, since that checks the server's operating system, which will remain the same until you move the code to another machine yourself. update: and you definitely do not want to open a bunch of browser windows on the server either.

What you want is to have the code that runs on the browser to behave in a certain way. For some reason you expect the users all to use IE, but that's immaterial. What you have to realize is that the behaviour of the browser is determined by whatever the browser receives. There are ways to open a new browser window. One is to use Javascript to open a new window with a new url. See window.open(). The other is to use a target attribute on a link.

  • Comment on Re: Open another IE browser window from CGI

Replies are listed 'Best First'.
Re^2: Open another IE browser window from CGI
by nikosv (Deacon) on Jan 24, 2008 at 07:59 UTC
    you have to run javascript on the client side.so your cgi script should output the following among others:
    <html> <head> <script language="JavaScript"> <!-- function open_new_window(url,name) { new_window = window.open('http://www.perlmonks.com','perlmonks','width +=300,height=200,left=100,top=30') } // --> </script> </head> <body onload="open_new_window()"> a perlmonks window should appear </body> </html>
Re^2: Open another IE browser window from CGI
by Olaf (Acolyte) on Jan 24, 2008 at 14:55 UTC
    In this instance, the browser and server will always be on the same machine (a vmware image). So shouldn't this open a new browser session on the server side?
    Do you believe in miracles? Yes!