[thelist] Cookies and images

James Hardy evolt at weeb.biz
Fri Feb 4 12:26:17 CST 2005


> 
> Here's an example of what I'm trying to accomplish...
 > ...
>  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.
> 
Blimey! to me that seems a very complicated way of doing it to me. Are 
you tied to the idea of using cookies? If not you might want to consider 
doing it this way:

use javascript to load an external XML file (either using the standards 
document.implementation or using Microsoft's ActiveX way of doing stuff) 
which could be in the format:

<picture>
	<image>/images/im123456.jpg</image>
	<photographer>Fred Bloggs</photographer>
	<copyrightyear>2004</copyrightyear>
	<copyrightemail>fred at blogs.co.xx</copyrightemail>
</picture>

or whatever feels most right at the time. This would of course be 
generated dynamically server side from whatever database you were using.

Then simply parse that to get the values; then you can just populate the 
image and displayed information with the information you have got.

use setInterval to lather, rinse and repeat, and you'd be sorted.

-- 
James Hardy




More information about the thelist mailing list