JavaScript ColorPicker : Color Chooser « GUI Components « JavaScript DHTML






JavaScript ColorPicker

 

<html>
<head>
<title>DynAPI Examples - HTML ColorPicker</title>
<script language="JavaScript" src="./dynapisrc/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('./dynapisrc/');
dynapi.library.include('dynapi.api');
dynapi.library.include('TemplateManager');
dynapi.library.include('HTMLColorPicker');
</script>
<script language="Javascript">

var img = dynapi.functions.getImage('./dynapiexamples/images/colpick.gif',21,12);

var t = 'This is the Template:<center><table border="0"><tr><td width="200">Select a Color: <br>{@cPicker}</td></tr></table></center>';

var tp = new Template(t,100,100,350,200,'#EEEEEE');
tp.addChild(new HTMLColorPicker(null,img.getHTML()),'cPicker');


dynapi.document.addChild(tp);



</script>
</head>
<body>
<script>
  dynapi.document.insertAllChildren();
</script>
</body>
</html>

           
         
  








dynapi.zip( 791 k)

Related examples in the same category

1.Text foreground and background color picker
2.Color Picker (Windows style)
3.Color picker (IE only)
4.Color chooser in JavaScript
5.DHTML Color Picker
6.Farbtastic: jQuery color picker plug-in