use script.alicio.us for color picker -> php GD
I want to use a color picker to pick two colors and then draw a rectangle with a gradient using the two colors, via php/GD.

I'm currently working with prototype.js/script.alicio.us 

So, two color picker html fields:

    <form>
    <p>color 1 #<input type="text" id="colorfield1" value="FF33FF"></p>
    <p>color 2 #<input type="text" id="colorfield2" value="CC3366"></p>
    </p>
    </form>

With prototype.js, it looks like I need to create some kind of event listener and then trigger off my php script from that.

I think it should look a little bit like this, but am not certain:

    <script type="text/javascript">
    Event.observe(window, 'load', function() {
      Event.observe('colorfield1', 'submit', what goes here???);
      Event.observe('colorfield2 , 'submit', what goes here???);
    });
    </script>

I'm using this color picker code: 
http://code.google.com/p/colorpickerjs/


use script.alicio.us for color picker -> php GD
===

I want to use a color picker to pick two colors and then draw a rectangle with a gradient using the two colors, via php/GD.

I'm currently working with prototype.js/script.alicio.us 

So, two color picker html fields:

    <form>
    <p>color 1 #<input type="text" id="colorfield1" value="FF33FF"></p>
    <p>color 2 #<input type="text" id="colorfield2" value="CC3366"></p>
    </p>
    </form>

With prototype.js, it looks like I need to create some kind of event listener and then trigger off my php script from that.

I think it should look a little bit like this, but am not certain:

    <script type="text/javascript">
    Event.observe(window, 'load', function() {
      Event.observe('colorfield1', 'submit', what goes here???);
      Event.observe('colorfield2 , 'submit', what goes here???);
    });
    </script>

I'm using this color picker code: 
http://code.google.com/p/colorpickerjs/

