Loading ...
Sorry, an error occurred while loading the content.

Using two color picker in same page.

Expand Messages
  • anil_shrestha123
    I have used color picker and it worked well. My requirement is to use two color picker container and extract the value of HEX field and put in my seperate text
    Message 1 of 3 , Sep 5, 2008
    • 0 Attachment
      I have used color picker and it worked well.

      My requirement is to use two color picker container and extract the
      value of HEX field and put in my seperate text field.
      My code looks like this in colorpicker-fromscript_clean.html

      <input type="text" id="hexval1">
      <input type="text" id="hexval2">
      <div id="container1">
      </div>
      <div id="container2">
      </div>

      I have extracted the value of HEX field of color picker container1
      and put it in text field "hexval1".

      But I did not get the solution for extracting and putting the HEX
      value of color picker container2 in text field "hexval2".

      Pls help me if there is solution...
    • Lucas Smith
      ... Sorry for the long delay. It is possible to include multiple ColorPickers on a page. Check out this example for guidance:
      Message 2 of 3 , Oct 1, 2008
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "anil_shrestha123"
        <anil_shrestha123@...> wrote:
        >
        > I have used color picker and it worked well.
        >
        > My requirement is to use two color picker container and extract the
        > value of HEX field and put in my seperate text field.
        > My code looks like this in colorpicker-fromscript_clean.html
        >
        > <input type="text" id="hexval1">
        > <input type="text" id="hexval2">
        > <div id="container1">
        > </div>
        > <div id="container2">
        > </div>
        >
        > I have extracted the value of HEX field of color picker container1
        > and put it in text field "hexval1".
        >
        > But I did not get the solution for extracting and putting the HEX
        > value of color picker container2 in text field "hexval2".
        >
        > Pls help me if there is solution...
        >

        Sorry for the long delay.

        It is possible to include multiple ColorPickers on a page. Check out
        this example for guidance:
        http://yuiblog.com/sandbox/yui/v260/examples/colorpicker/colorpicker_two.html

        Hope this helps,
        Luke
      • bretlevy
        You may want to look at this simple demo too: http://sandbox.bluelinkdemo.com/sandbox/colortest1.htm This example shows how to have multiple color inputs
        Message 3 of 3 , Oct 1, 2008
        • 0 Attachment
          You may want to look at this simple demo too:

          http://sandbox.bluelinkdemo.com/sandbox/colortest1.htm

          This example shows how to have multiple color "inputs" re-using the
          same color picker object. This may be what you're looking for.

          Note that I show the "color" in the textbox versus the hex value, but
          you can see how to change it to show the text value too (or in place
          of the color).

          ~~bret



          --- In ydn-javascript@yahoogroups.com, "anil_shrestha123"
          <anil_shrestha123@...> wrote:
          >
          > I have used color picker and it worked well.
          >
          > My requirement is to use two color picker container and extract the
          > value of HEX field and put in my seperate text field.
          > My code looks like this in colorpicker-fromscript_clean.html
          >
          > <input type="text" id="hexval1">
          > <input type="text" id="hexval2">
          > <div id="container1">
          > </div>
          > <div id="container2">
          > </div>
          >
          > I have extracted the value of HEX field of color picker container1
          > and put it in text field "hexval1".
          >
          > But I did not get the solution for extracting and putting the HEX
          > value of color picker container2 in text field "hexval2".
          >
          > Pls help me if there is solution...
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.