Click link to change image

He has: 49 posts

Joined: Jul 2007

Hi all,

I'm building a site for one of my clients and can't seem to come up with a solution to this problem-

I'm wanting the photograph within a web page to change when visitors click on the title of the photograph they want to see. These titles will be in an unordered list.

In other words, if there was a list of names on the left and a photograph on the right, when someone clicks on a different name then the photograph changes, relevant to the name.

If you get what I mean!!!

Thanks in advance for any help given,

Gary

robfenn's picture

He has: 471 posts

Joined: Jun 2005

This uses a dropdown but the code is basic, you could strip the form out.
http://wsabstract.com/script/cut173.shtml

Alternatively i used a back and next thing on our website for the little screenshots:
http://www.sixthsense-esp.co.uk/infinity-crm-screenshots-1.htm

He has: 49 posts

Joined: Jul 2007

Thanks for the links robfen,

I'm afraid I've never had to use Java before now, and I'm not sure on how I'd convert the code (in the first link you supplied) from a table layout to css, div etc. Could I still use an unordered list rather than a drop-down menu?

Thanks again robfen,

Gary

calculator's picture

They have: 40 posts

Joined: Nov 2007

graisbeck,

turn your image titles into links and use javascript for it.

Here is an example using onmouseover() http://www.webdevelopersnotes.com/tutorials/javascript/changing_images_on_mouseover_mouseout_javascript.php3

Simply replace onmouseover by onclick in the above tutorial.

Otherwise post your page code here and we'll try and help you out more.

hope this helps.

He has: 49 posts

Joined: Jul 2007

Thanks to all who replied to my problem.

I found a solution to my problem, it was an inline image viewer that I required after all. It just needs a little tinkering with css to place it on my page.

Heres the link incase anyone else has the same problem -

http://www.scriptsearch.com/cgi-bin/jump.cgi?ID=1257

Thanks again,

Gary

They have: 1 posts

Joined: May 2012

Thanks for the link graisbeck , was searching for that code .
Anyone know how to add a fade effect to that .

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.