[thelist] Pop up images

M. Seyon evoltlist at delime.com
Mon Mar 27 08:01:25 CST 2006

Message from Justin Zachan (3/27/2006 10:06 PM)

>What I would ideally like to do... is not use a DB if possible... But might
>be a better idea than I am doing...
>Something like this
>What I would ideally like to do is...
><a href="javascript:popUp('large_image.php')"><img src="images/025_t.jpg"
>alt="" width="156" height="119"></a>
>(set some variable that will tell the large_image.php to select the large
>image that matches the thumb.)

You'd probably need to do it more along the lines of

Otherwise it'd be a bit of a trick to get the image name back out of the 
html code.

How is your list of images built? Have you manually coded each link and 
edited the "024.php", "025.php"?

If you have it's still going to be a hassle to change the iid (image id) on 
each image link.

If you don't want to use a db, you could maybe use an array. Pseudocode:

$imagearray = array(024,025,026,027)

foreach $item in $imagearray
print [html code with $item embedded as iid and as filename, etc]

I do something similar with one of my sites and it works fairly well. I 
even use it to manage separate galleries and store additional info such as 
image dimensions, captions, gallery titles, etc.

If you're comfortable with multidimensional arrays I've found they can 
serve fairly well as a poor man's database for solutions such as this that 
don't require any significant modification once they're coded.


Trinidad Carnival in all its photographic glory. Playyuhself.com

More information about the thelist mailing list