Popup Color Picker

Discussion in 'JavaScript' started by lopetzi, Jan 28, 2008.

  1. #1
    Hello!

    I've looked everywhere for a free color picker that is good for me but i didn't found it.
    I need a color picker that sends the selected color to a form input and calls a functions in the same time. The function is used to change an element of the page to the color selected. The color picker will be included more than once in the page because i need to change the color of a few elements.
    If you know something that does that please tell me....
     
    lopetzi, Jan 28, 2008 IP
  2. Dolbz

    Dolbz Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Google for 'javascript color picker'. First result is good for me. It seems I can't post links yet though :p

    That looks pretty professional. You'll just have to modify it slightly to call your function when the colour is changed. Should be a two minute job.
     
    Dolbz, Jan 28, 2008 IP
  3. lopetzi

    lopetzi Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i've seen it...it's too complicated and large... i need it to be a popup because i will put around 8 on a page
    i've found a nice one here: http://www.mattkruse.com/javascript/colorpicker/ but i am not good at js and i can't modify it to do what i need...
    it has a function that is called when i pick a color, but the same function is called for every popup...
    i've made something like this
    function x(color) {
    this.document.getElementById('id').style.color = color;
    }
    the color is already extracted... but i don't know how to pass another variable for the id because i need to change the color of a few elements with different id's...

    if someone could look at this source and tell me how to do it, he would be my hero :)
     
    lopetzi, Jan 28, 2008 IP
  4. lopetzi

    lopetzi Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    solved...............
     
    lopetzi, Jan 30, 2008 IP