Popup New Browser Window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dipesh Mehta

    Popup New Browser Window

    Can anybody help me regarding how to open a new browser window with my
    specification from within perl script for new output? NB: I can do
    this easily with javascript.

    Thanks in advance.
  • Leif K-Brooks

    #2
    Re: Popup New Browser Window

    Dipesh Mehta wrote:[color=blue]
    > Can anybody help me regarding how to open a new browser window with my
    > specification from within perl script for new output? NB: I can do
    > this easily with javascript.[/color]

    Unless you're talking about client-side Perl or a window on the server,
    can't be done. Your Perl is almost definitley running on your server,
    all it can do to the client is send data (which can be JavaScript, of
    course).

    Comment

    • Jürgen Exner

      #3
      Re: Popup New Browser Window

      Dipesh Mehta wrote:[color=blue]
      > Can anybody help me regarding how to open a new browser window with my
      > specification from within perl script for new output? NB: I can do
      > this easily with javascript.[/color]

      Trivial. A browser is in no way different then any other external program
      and you would use system() to start it. Details see 'perldoc -f system'.

      Of course, if this is a secret CGI question, then the answer would be
      totally different, but as you didn't mention CGI I am assuming that you are
      dealing with normal Perl programs.

      jue



      Comment

      • Dipesh Mehta

        #4
        Re: Popup New Browser Window

        Dear Jue,

        Thanks for reply. At present, I use following combination to get a
        parsed html output in a user-defined browser window.

        HTML
        <a href="javascrip t:newpop('filen ame.htm')">Prev iew</a>

        JAVASCRIPT
        function newpop(filename ) {
        cgiurl='http://www.domainname. com/cgi-bin/script.pl?file\ ='
        newurl=cgiurl+f ilename
        apopup =
        window.open(new url,'note','too lbar=yes,locati on=no,top=50,le ft=50,directori es=no,status=no ,scrollbars=yes ,copyhistory=no ,height=400,wid th=600,');
        }

        and a perl script to parse the contents of input html document and
        print output to the newly opened window.

        Now I want to skip the javascript module and defining hyperlink on
        every page with the filename. I can get rid of the filename with
        HTTP_REFERER, but I don't know how to open new browser window with my
        specification. I am using linux based virtual hosting running apache.

        If you can help me in the matter or if you have any other solution to
        get the rid of this situation, always welcome and shall be
        appreciated.

        Dipesh

        Comment

        • Gunnar Hjalmarsson

          #5
          Re: Popup New Browser Window

          Dipesh Mehta wrote:[color=blue]
          > At present, I use following combination to get a parsed html output
          > in a user-defined browser window.
          >
          > HTML
          > <a href="javascrip t:newpop('filen ame.htm')">Prev iew</a>
          >
          > JAVASCRIPT
          > function newpop(filename ) {
          > cgiurl='http://www.domainname. com/cgi-bin/script.pl?file\ ='
          > newurl=cgiurl+f ilename
          > apopup =
          > window.open(new url,'note','too lbar=yes,locati on=no,top=50,le ft=50,directori es=no,status=no ,scrollbars=yes ,copyhistory=no ,height=400,wid th=600,');
          > }
          >
          > and a perl script to parse the contents of input html document and
          > print output to the newly opened window.
          >
          > Now I want to skip the javascript module and defining hyperlink on
          > every page with the filename.[/color]

          I don't know how to not use JavaScript, but maybe this does what you want:

          <a target="note" onclick="window .open('','note' ,
          'toolbar=yes,lo cation=no,top=5 0,left=50,direc tories=no,statu s=no,scrollbars =yes,copyhistor y=no,height=400 ,width=600')"
          href="http://www.domainname. com/cgi-bin/script.pl?file= filename.htm">
          Preview</a>

          --
          Gunnar Hjalmarsson
          Email: http://www.gunnar.cc/cgi-bin/contact.pl

          Comment

          Working...