Click to See Complete Forum and Search --> : how to change color of part of image(like periodic table) on click
sanny
12-11-2002, 02:52 PM
I need to change the color of part of a image on click. Like in Chemical periodic table, if you click on one box, I want to change the color of that box plus on double click want to change the same back to normal.
like in this page:
chemical Periodic table page (http://www.chemicool.com/)
Any help will be appreciated.
Thanks,
Sandeep Makharia
gil davis
12-11-2002, 03:19 PM
Javascript cannot change the color of an image, much less part of an image.
It would probably be easier to use individual images. Each would have a duplicate that is a different color. When you click (or whatever), you swap the image source to the one that is different in color.
sanny
12-11-2002, 03:22 PM
thanks davis for reply. but as u must have seen, I am working on periodic table which is one gif file and I am using coordin. to capture the image clicked but I need to change the color also, if not color than is there anyway, I can put cross sign image over those coordinates so that user knows that, what element already selected.
apart from javascript, is there anyother way to acheive this
Charles
12-11-2002, 03:29 PM
Cut the 'gif' up into little pieces and swap the pieces. It'll make the page more accessible as well.