Forum Moderators: open

Message Too Old, No Replies

change text on image rollover - Is this possible

change text on image rollover

         

syka786

9:26 pm on Jan 30, 2006 (gmt 0)

10+ Year Member



Im am building a portfolio of some art pieces I have made. I want to have a main page where there are a few thumbnails of the images and on mouseover the thumbnail is shown as the main image.
I can do this part but I need to have some text describing the art piece with each main image.
The text changes depending on what image is displayed as the main image. Hope this makes sense and thanks for any advice.
Tahir

Moby_Dim

11:57 am on Jan 31, 2006 (gmt 0)

10+ Year Member



Use text container (suppose <div id="text_container"></div>), and attach to your code something like this : text_container.innerHTML = 'bla bla...' . One array for images, and the other - for corresponding texts. Use array index for the event handler function call (e.g.onmouseover="show_picture(3)"). (onclick is better imho.)

And welcome to WebmasterWorld ;)