Sten has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

Environment:
Perl5.6.1 ( Active state )
CGI.pm

I'm running my 'Maintain.cgi' script in an explorer window (IE55). Among more buttons and 'things' defined, there is a <Start Filetran> button. When pressing the <Start Filetran> button, I want a new explorer window (IE55) to initialize, and run my filetran.cgi script within it. Both scripts resides in the same cgi-bin on the same IIS.

My existing 'Maintain.cgi' should remain in the original window, totally independend of the newly initialized IE55 window.

I Don't know how to ( from a cgi script ) initialize a new IE55 window, running another cgi script?

And on top of that, it would be handy to pass i string ( holding Hostname for filetran) to the new window.

Thanx to everone that will give some directions/advices on this one.

elsif ( param(DoFiletran) ) { ??? };

Regards
Sten

2003-04-20 edit ybiC: retitle from "How to Start a seperat explorerer window/cgi script from a running explorer window/cgi script"

  • Comment on CGI script to open a new browser window?

Replies are listed 'Best First'.
Re: How to Start a seperat explorerer window/cgi script from a running explorer window/cgi script
by pfaut (Priest) on Apr 19, 2003 at 12:38 UTC

    You're not creating a new browser window from the CGI script. You're creating a new window based on the user pressing a button in the current browser window. What you need to do is place that button inside a form that has the second script as its action and target set to '_new' (or an unused window name). Something like this in the page generated by Maintain.cgi:

    <form action="filetran.cgi" target="_new"> <input type="submit" value="Start Filetran"> </form>
    90% of every Perl application is already written.
    dragonchild
Re: How to Start a seperat explorerer window/cgi script from a running explorer window/cgi script
by benn (Vicar) on Apr 19, 2003 at 17:03 UTC
    ....and to supply the string...
    <form action="filetran.cgi" target="_new"> <input type="hidden" value="my_hostname_string"> <input type="submit" value="Start Filetran"> </form>
    Cheers,
    Ben
      Hi,

      Brilliant, thanx a lot!!

      ...eh...but, now i got my Maintain.cgi explorerwindow holding 3 frames (coloums).
      1-my filtran frame
      2-my request frame
      3-my response frame

      Initially i wanted just 2 frames, and that the filetran submit button (also) should be in my request frame...
      My filetran frame ( which is fare left, and goes from the top of the window to the bottom of the window, and is fairy narrow) is now holding a single submit-filtran button (and a hidden-field) I feel that like a waste of window-space. In addition I need more buttons like my filetran butten ( causing new windows to appear). (buttons like <DoSoftwareUpgrade>,<LocalUserHandling>...)

      Is there a way to divide my fare left frame horisontally, so I can have more buttons fare left in seperat frames under each other?...or is there a ( totally )better approach to my design problem?
      Here is my frameset print:

      frameset({-cols=>'5%,35%,60%'},
      frame({-name=>'filetran',
      -src=>"$script/filetran"}),
      frame({-name=>'request',
      -src=>"$script/request"}),
      frame({-name=>'feedback',
      -src=>"$script/feedback"})

      (Yes, my cgi script is based on the 'popup.cgi' example provided in many perl sites.)

      Thanx again for all help!

      Regards
      Sten

        Ermmmm - I began to lose it a little after a while...do you just mean horizontal frames? something like...
        <frameset cols='x%,y%'> <frameset rows="a%,b%,c%"> <frame name='menu_button_1'> <frame name='menu_button_2'> <frame name='menu_button_3'> </frameset> <frame name='results'> </frameset>
        You could try posting an example URL to make it a little clearer.
        Cheers,
        Ben