develooper Front page | perl.beginners | Postings from February 2002

RE: Open a brand new browser window with Perl

Thread Previous
From:
Ron Goral
Date:
February 7, 2002 07:25
Subject:
RE: Open a brand new browser window with Perl
Message ID:
BNEHILDKCDOMHKMLNDCCGEGNCCAA.rongoral@uponthemountain.com


I hate it when I make a post and then answer my own questions, but Morbus
made me recall the window resizing and moving methods useable via
JavaScript.  If I were to "print" the new page with an onLoad event that
called the resizeTo and moveTo methods, I can resize and move my windows
anywhere I wish.  It's not a new window, but it sure walks and talks like
one.  The same is true of all the window properties.

Sorry 'bout the bad post guys.

Ron

 >Is it possible to open a brand new browser window and set it's size,
 >location and characteristics (no menu bar, no status bar, etc.) using Perl
 >or is it necessary to always use the same window that has called the
script?

With Perl, no. But you can certainly tell Perl to send some javascript that
does what you want to the browser. Have Perl spit out something like this
to the browser window:

  <html>
  <head>
     <SCRIPT LANGUAGE = "Javascript" TYPE="text/javascript"><!--
     function open() { window.open('/path/to/file.shtml', 'Your New Window',
     'height=125,width=360,toolbar=no,scrollbars=no,menubar=no,location=no,
     directories=0,status=no,resizable=0'); }
     //--></SCRIPT>
     <title>See Other Window</title>
  </head>
  <body onLoad="open()">

   <h1>Please See The Other Window</h1>

  </body>
  </html>



--
Morbus Iff ( softcore vulcan pr0n rulezzzzz )
http://www.disobey.com/ && http://www.gamegrene.com/
please me: http://www.amazon.com/exec/obidos/wishlist/25USVJDH68554
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About