That will work for people that have Javascript enabled in their browsers, which is the 
majority, but it's not everyone. Better to handle it server side to guarantee it works 
(or at least you will have more of a guarantee than with client side Javascript). 

Have you looked into the LWP module? You should easily be able to do what you describe 
with that.

Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]


-----Original Message-----
From: Joshua Hayden [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 07, 2002 1:14 PM
To: [EMAIL PROTECTED]
Subject: Re: Redirecting to a page and downloading


Javascript seems to work pretty well for this.
<body onLoad="window.open('somefile.zip')">

If you put this in a page, the visitor will be prompted to download the file
as soon as the page is fully loaded.

Best Regards,
JOSHUA D. HAYDEN


----- Original Message -----
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 06, 2002 10:52 PM
Subject: Redirecting to a page and downloading


> Hi all,
>
> I want to make a script that will start downloading a file when a link is
> clicked, then it will redirect to another web page.
> Please advice how to do it.
> If I put:
> print "Location: $path\n\n";
>
> ... this will start downloading if the $path is a path to a file, but the
> page won't be printed.
>
> Should I use the <meta http-equiv="refresh" ...> in the web page to print
> first the page, then that page to redirect the visitor to that file for
> downloading it?
>
> Is it the only solution?
> I would like to need only a script for this.
>
> Thank you!
>
> Teddy,
> My new email address is [EMAIL PROTECTED]
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/02

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/02


Reply via email to