View Full Version : thumbnails & (maybe) javascript


schizophelia
07-12-2003, 05:38 PM
This is a little hard to explain, but I'd like to use thumbnails on my website to post pictures. I was wondering if there was a code to this, or what??

Also, is it possible to click on the thumbnail image and have the full-size picture come up on a small seperate window? I think that's javascript although I could be wrong. How would do that?

Any help would be very much appreciated!!

Jasmine1234
07-12-2003, 09:20 PM
I don't think there's any kind of "code" to make thumbnails other than to load the whole large image file and just have it restricted to a certain size but that would probably mean a long load time for your web page. There are some freeware utilities for easily creating large batches of thumbnails. Just check out http://www.download.com and do a search for thumbnails.

As for making the picture pop up in a smaller window try this:

<script language=javascript>
<!--//begin script

function new_window(url) {
link=window.open(url,"link"," toolbar=0,location=0,directories=0,status=0,menuba
r=0,scrollbars=0,resizable=0,width=400,height=275,
left=80,top=80");
}

-->//end script
</script>

placing the above code inside of your <head> tags.

Call the function like so:
<a href="java script:new_window('my_large_image.jpg')"><img src="my_small_image.jpg" alt="This is a thumbnail of a larger image"></a>

And that should be all you need. Hope that helps.

kittycat
07-12-2003, 10:23 PM
Lissa has a few ways to make thumbnails here: http://www.lissaexplains.com/fun5.shtml#thumbnails