Hey guys,
i am using the color selector from http://www.dynamicdrive.com/dynamicindex11/yuicolorpicker/index.htm
and have com across a problem, if you use the color selector it fills a color box next to the text field, i would like it to fill that box and also another one on the same page, but after i add another div with the same ID it doesn't load the second one as well, but if i delete the first one the second one starts working, is there a way i can make the 2 color box's work simultaneously?

thanks for any help

baleric

brandonH

12-01-2006, 02:01 AM

it doesnt work because the script probably calls to the element by id. and the first elemement it sees with that specific id is the only one it will change. you will haveto add in another line to specify the second div (give it a different id).

Kor

12-01-2006, 08:32 AM

id must be unique on the same page/session. Give another id to your second element , and (not an elegant method, but it allows you to avoid modify the code) repeat the called function passing that id as parameter:

that wasn't successful, i was really hoping that would work im a bit of a javascript noob,
it only changes the last ddcolorposter command, so wateva colorbox is last thats what changes.
is there any other way to do this without changing the main code?