Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Content Disposition question

Status
Not open for further replies.

frozenpeas

Technical User
Joined
Sep 13, 2001
Messages
893
Location
CA
Hi,

I have the following code:

Code:
<?php
header('Content-type: image/jpeg');
header('Content-Disposition: attachment; filename='.$filename);
// The source file
readfile($filename);
?>

which works fine.

When the user clicks "Open" rather than "Save" is there any way to open the file in a new window? It currently opens in the same window which doesn't work for my purposes.

Thanks in advance.

frozenpeas
 
To the best of my knowledge, no.

You'd have to have the link which points to this file open a new window.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
All right, thanks for the response.

frozenpeas
 
Do you specificlaty want the user to be able to save the image if he wants?, you might be able to rig up some JavaScript code to help you out.
Dumb point: you know you can right click and save the image don't you ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top