Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Popup New Browser Window

Reply
Thread Tools

Popup New Browser Window

 
 
Dipesh Mehta
Guest
Posts: n/a
 
      12-10-2003
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.
 
Reply With Quote
 
 
 
 
Leif K-Brooks
Guest
Posts: n/a
 
      12-10-2003
Dipesh Mehta wrote:
> 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.


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).

 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      12-10-2003
Dipesh Mehta wrote:
> 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.


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



 
Reply With Quote
 
Dipesh Mehta
Guest
Posts: n/a
 
      12-16-2003
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="javascript:newpop('filename.htm')">Preview</a>

JAVASCRIPT
function newpop(filename) {
cgiurl='http://www.domainname.com/cgi-bin/script.pl?file\='
newurl=cgiurl+filename
apopup =
window.open(newurl,'note','toolbar=yes,location=no ,top=50,left=50,directories=no,status=no,scrollbar s=yes,copyhistory=no,height=400,width=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
 
Reply With Quote
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      12-16-2003
Dipesh Mehta wrote:
> At present, I use following combination to get a parsed html output
> in a user-defined browser window.
>
> HTML
> <a href="javascript:newpop('filename.htm')">Preview</a>
>
> JAVASCRIPT
> function newpop(filename) {
> cgiurl='http://www.domainname.com/cgi-bin/script.pl?file\='
> newurl=cgiurl+filename
> apopup =
> window.open(newurl,'note','toolbar=yes,location=no ,top=50,left=50,directories=no,status=no,scrollbar s=yes,copyhistory=no,height=400,width=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 don't know how to not use JavaScript, but maybe this does what you want:

<a target="note" onclick="window.open('','note',
'toolbar=yes,location=no,top=50,left=50,directorie s=no,status=no,scrollbars=yes,copyhistory=no,heigh t=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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Postback in Popup Window Opens a New Browser Amir Shaz ASP .Net 5 08-31-2012 07:20 AM
New Popup Window from an existing Popup Window Raffi Javascript 4 08-12-2004 01:21 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM
How to use an asp:button to create a new browser window and output contents to new window =?Utf-8?B?Tm92aWNl?= ASP .Net 2 06-09-2004 10:54 PM
Need to open a new browser window, not a new window Gordon ASP General 3 04-16-2004 10:46 PM



Advertisments