httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <cs...@fx.ro>
Subject RE: [users@httpd] Configure to send jpg images with HTML around them?
Date Wed, 16 Jul 2003 12:22:36 GMT
The simplest approach that comes to mind would be to use a simple HTML
wrapper server side program (CGI, PHP, etc). This program, let's call it
imagewrapper.cgi, should receive the image name as a parameter and return it
wrapped in some minimal html to the browser like:

<html>
<body>
<img src="foo.jpg">
</body>
</html>

Then you should change all your existent click-able links to something like:
<a href="imagewrapper.cgi?img=foo.jpg"><a>

HTH,

Lian Sebe, M.Sc.
Freelance Analyst-Programmer
www.programEz.net

> -----Original Message-----
> From: Ryan Stille [mailto:rps@willconsult.com]
> Sent: Tuesday, July 15, 2003 6:28 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] Configure to send jpg images with HTML around
> them?
>
>
> I'd like to change my apache configuration so that when a user
> clicks on a jpg image (while "browsing" a directory of images)
> that instead of just sending the foo.jpg directly to the browser,
> it sends something like <IMG SRC="foo.jpg">.
>
> I need to do it this way because I am trying to read the path to
> this image via JavaScript from another frame.  Unless it's an
> actual HTML page, I cannot get at any JS variables in that frame
> (security thing).
>
> Is this possible?  I've done some google searching for it, but I
> think this is a rare need and I haven't found anything about it.
>
> I'm running apache 1.3.
>
> Thanks,
> -Ryan
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message