[thelist] Cookies and images

Joshua Olson joshua at waetech.com
Fri Feb 4 11:41:05 CST 2005


> -----Original Message-----
> From: Simon Perry
> Sent: Friday, February 04, 2005 11:16 AM

> I don't think that an image tag supports the onload event :-(
> 
> http://www.w3.org/TR/REC-html40/struct/objects.html
> http://www.w3.org/TR/REC-html40/sgml/dtd.html#events

Holy cow.  I never realized that before, but it looks like you may be
correct.

> Move the onload event trigger to the <body> element and I bet 
> it works.

For images referenced directly within the HTML, you are most likely correct.
However, I plan on loading images dynamically after the page is loaded.

> Still not clear what you are trying to achieve or quite what 
> you mean by 
> "meta information" in this context?

Here's an example of what I'm trying to accomplish...

Let's say we have an online photo archive of 1 million photos.  I'd like to
have a button that replaces the existing image (without a page refresh) by
updating the image src to call a page on the server to return a single
random image from the archive.  I'd also like the photographers name, the
copyright year, the camera information, and the email address of the
copyright holder to be returned with the image.  My thought was to have the
information returned as cookies within the image so that I can publish them
to the page in appropriate places.

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168 




More information about the thelist mailing list