mattybrown
asked on
image swap grid
My client is an artist. He wants to show a a grid of 9 images on a page. On clicking on an image, he wants it to change to another image which stays. So by the time the vistor clicks all nine images, they are looking a a completely different set of images than on entry.
Can anyone give any advice on the simplest way to do this.
Can anyone give any advice on the simplest way to do this.
ASKER
So would that mean that by clicking each of the nine initial images you could finish up with a completely different set of nine images on the same page?
Yes
Now, if the question is which image will be replacing the existing one: You might want to store those image URLs in an array.
Now, if the question is which image will be replacing the existing one: You might want to store those image URLs in an array.
ASKER
Perfect. Thank you.
One other thing though. You said: 'those image URLs in an array'. Not too sure what you mean by this. The site will be a simple HTML site.
One other thing though. You said: 'those image URLs in an array'. Not too sure what you mean by this. The site will be a simple HTML site.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you. That's very helpful.
<img src="" onclick="changepic(this)">
function changepic(thisObj)
{
thisObj.src=img_src;
}