Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
08-22-2011, 05:21 PM #1
- Join Date
- Aug 2011
- Norfolk, UK
- Thanked 0 Times in 0 Posts
How do I swap an image on a page using multiple variables?
I am trying to make an image swap to another image, based on two variables.
i.e. Change an image of a “blue car with silver wheels” to a “red car with black wheels”.
The variables are the 1. colour of the car and 2. colour of the wheels. The visitor to the page will click on a coloured car icon to swap the image to the correct coloured car and then on a coloured wheel icon to change the wheel colour.
I have pre-prepared jpegs of all of the combinations of car/wheel colour.
Struggling, so any suggestions gratefully accepted. Thanks.
08-22-2011, 07:11 PM #2
If you have only two variable, then name the images to the combinations available,
ie; blue_silver.jpg or red_black.jpg for the carColor_wheelColor.jpg designations.
Then depending upon the users choice, the correct image will be displayed.
Show some code and we can assist further.