newbie question regarding images

C

Charlene

I have a table with multiple small thumbnails............I want to make it
so when clicking on a thumbnail the image enlarges in the same
location...........
possibly using 2 different images
tia!

~Designs by Sierra~ ~Sierrabunny's Hutch~ ~AMRT~ *~*Christmas Ideas*~*
~American Nutcrackers~
 
J

Java script Dude

Charlene said:
I have a table with multiple small thumbnails............I want to make it
so when clicking on a thumbnail the image enlarges in the same
location...........
possibly using 2 different images
tia!

try this:

<img name="imgTest" src="test_sm.gif" onclick="switchImage(event,this)">
<script>
function switchImage(e,o){
if(o.src.indexOf("_sm")>-1)
o.src=o.src.replace(/_sm/,"_lg")
else
o.src=o.src.replace(/_lg/,"_sm")
}
</script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top