SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2007
    1 Post(s)
    0 Thread(s)

    A challenge [Fixing a very nice color picker script]

    Hi, i've been working to get this script to work and it works in Firefox.
    In IE though the PNG background of the big square color picker (click button on the right) does not change to the color of the color slider, it's always grey instead
    The big square color picker area exists out of a transparent black and white gradient png and a white background png for the color (wich i think acts as a placeholder since that area has to change color).

    I figure that somewhere in the process of the script something is not working for IE but i find it hard to figure out what it is.

    Please help me figure this out.

    A demo of the script can be seen at the bottom of this page Demo and tutorial
    My working sample can be downloaded from here Download Sample

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Nelson BC
    0 Post(s)
    0 Thread(s)
    Interesting. I got it working *sometimes* in IE, using the original blank.gif (the one called blank_old.gif) and a lot of mucking around. In the end the html file looked like:
    <style type="text/css">
    img {
    	behavior: url(;
    <script src="colorpicker.js" type="text/javascript"></script>
    <script type="text/javascript">
    function init(){
    	var inp1 = document.getElementById('input1');
    	var inp2 = document.getElementById('input2');
    	if(inp1) attachColorPicker(inp1);
    	if(inp2) attachColorPicker(inp2);
    window.onload = init;
    <input id="input1" /><br /><br />
    <input id="input2" />
    There are 2 versions of floating around. I ended up having some luck with the 1.5kb one as opposed to 3.5kb.

    Sometimes, when you click on a text box, you get a white bar instead of the picker. I dunno why it does that. Proceed at your own risk


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts