YUI Color Picker Script, Scrips, Java, DHTML, Express
Contact
 


Quick search

 



Scripts - DHTML

Scripts - DHTML (new)

Web Developer Blog

Web Developer Blog (new)

Scripts and Applications

Ajax
ASP
ASP.NET
C and C++
CFML
CGI and Perl
Flash
Java
JavaScript
PHP
Python
XML

Software Downloads

Linux

Windows

Mac

Mobile

Drivers

DHTML Scripts - Detail

 

YUI Color Picker

Date added: 2007-05-18 03:04:51
FF1+ IE5+ Opr8+

YUI Color Picker

Description: Need a color picker for your online forms or application? This advanced color picker is based on Yahoo's excellent UI library, more specifically, the slider widget. We've added additional code to help integrate the color picker with forms on your page, so clicking on specific form fields causes the selected color value to be populated inside them in real time. Furthermore, a color box is shown alongside the field to display the current input color in real time.

One known issue with this script is in Opera 8.x, where dragging of the color picker and selection ball is non functional. FYI this is the same color picker we're using in our Button Maker tool. Enjoy!

Demo:

 


R H
G S
B V

#
 

Click on a form field below to populate it:

# ____
# ____


Directions:

Simply download YUI-Color-Picker/yuicolorpicker.zip, and open up "YUI-Color-Picker/demo.htm" using any text editor for the code to insert onto your page.

Customization

While this script references multiple .js files, to integrate the color picker with your form in the fashion above, you do not need to be bothered with modifying any of these files. Instead, there are only two changes you need to make to the code of "YUI-Color-Picker/demo.htm" to integrate the color picker into your page:

1) Locate the code:

ddcolorposter.fillcolorbox("colorfield1", "colorbox1") //PREFILL "colorbox1" with hex value from "colorfield1"
ddcolorposter.fillcolorbox("colorfield2", "colorbox2") //PREFILL "colorbox1" with hex value from "colorfield1"

These two lines are used to prefill the color boxes to the right of the form fields in question with the color currently inside the field when the page first loads. Without this code, when your page loads, the color boxes will not be initially filled with the color values inside the form fields.

There are two fields in the demo, hence two lines. The first parameter of fillcolorbox(), "colorfield1", should be the ID of the form field, while the second parameter, the ID of the matching color box. See below for more information.

2) Locate the code:

<form>
# <input type="text" id="colorfield1" onFocus="ddcolorposter.echocolor(this, 'colorbox1')"> <span id="colorbox1" class="colorbox">____</span> <br />
# <input type="text" id="colorfield2" onFocus="ddcolorposter.echocolor(this, 'colorbox2')"> <span id="colorbox2" class="colorbox">____</span>
</form>

This code demonstrates how to integrate the color picker with any form field on your page. The key is the add the code:

onFocus="ddcolorposter.echocolor(this, 'colorbox1')"

inside the desired form fields, where "colorbox1" is the ID of color box. That's it!

 

Leave a comment




(optional)

What is 7-3?




0 comments


 

Related DHTML Scripts

ColorJack DHTML color picker
Date Added: 2007-05-18
-User Submitted ColorJack DHTML color picker is a cross browser, sleek color picker that's compact to boot. Licensed under Creative Commons, use it on your sites or web apps....
pathGenerator
Date Added: 2007-06-16
-User Submitted _pathGenerator is an online wizard that allows anyone to easily create an animating layer that follows any desired path. Just drag your mouse to map out its course,...
VML Editor
Date Added: 2007-06-16
-User Submitted VML (Vector Markup Language) is a text based vector graphics format proprietary to Internet Explorer. Jacco has created the following powerful VML editor to allow you to use your...
Time-based Progress Bar
Date Added: 2007-06-16
-User Submitted This is a fully customizable "time based" progress bar. Set any duration (ie: 10 seconds) for the script to finish loading the bar. A great script to prov...
Event-based Progress Bar
Date Added: 2007-06-16
-User Submitted This is an event-based progress bar which you can add to existing scripts that require graphical representation. Using 3 pre-exposed methods, you control prec...
WinXP Progress Bar
Date Added: 2007-06-16
-User Submitted A great looking pure DHTML progress bar that resembles the one seen in Window XP's startup screen. All visual aspects of the bar can be customized, and the script can ...
Pie Graph script
Date Added: 2007-06-16
-User Submitted This is a purely DHTML/ CSS based Pie Graph script. It loads fast and blends in with the rest of the page....
Line Graph script
Date Added: 2007-06-16
-User Submitted Based on the same library as the Pie Graph script, this is a purely DHTML/ CSS based Line Graph script. It loads fast and blends in with the rest of the page....
Find In Page Script
Date Added: 2007-06-16
-User Submitted This cross browser DHTML script simulates the Edit> Find In Page feature of the browser to allow your visitors to easily search for a particular text on your page.&nb...
Tip of the day dialog
Date Added: 2007-06-16
-User Submitted Provide daily tidbits of interesting information to your visitors, in an even more interesting way, with this ultimate tip of the day script!...
Copy text to clipboard script
Date Added: 2007-06-16
-User Submitted This "demo" script does two things: 1) identifies the selected text on the page 2) copies this text to clipboard. As part of a larger application...
onMouseover scrollbar effect
Date Added: 2007-06-16
-User Submitted Use this unique script to apply a rollover effect to your webpage's scrollbar!...
Ajax load XML file script
Date Added: 2007-06-16
-User Submitted This script demonstrates the concept of using Ajax to load a simple XML file and display it on the page....
Gradient Bar
Date Added: 2007-06-16
-User Submitted An impressive demonstration of using DHTML code to render a gradient bar. Easily change the bar's color, position and direction, all through the setting of a few variabl...
Phong
Date Added: 2007-06-16
-User submitted Phong is an incredible ping-pong game with an even more impressive AI (artificial intelligence). Play against the computer, and see if you can win (take it for us, it's pos...

Last 20 Scripts

 
1. Dragonfly CMS
DragonflyCMS is a content management system based on PHP-Nuk
2. Diferior
Diferior is a flexible, customizable, both user and develope
3. DBHcms
DBHcms is a search engine optimized and lightweight content
4. concrete5
concrete5 content management system could be a rapid solutio
5. bloofoxCMS
bloofoxCMS is a lightweight content management system based
6. PHP Membership
PHP Membership script allows you to add password protection
7. Tube Spider
Tube Spider allows your visitors to search videos in Youtube
8. Azure CMS
Azure CMS is a universal software product for the developmen
9. Azure Portal
Azure Portal is a social networking script made with PHP pro
10. One Frog
One Frog is a content management system that allows you to u
11. Cigmas CMS
Cigmas CMS is a powerful web content management system for g
12. WebWord CMS
WebWord CMS is a full featured web content management system
13. Marjetica Content Management System
Marjetica Content Management System is a powerful, easy to u
14. Phenotype CMS
Phenotype CMS is a PHP/MySQL - Smarty Content Application Fr
15. Chupix CMS
Chupix is a content management system written in PHP and sto
16. Interspire Website Publisher
Interspire Website Publisher (formerly ArticleLive) is a con
17. Interspire Email Marketer
Interspire Email Marketer (formerly SendStudio) is a web bas
18. Comments RAM
Comments RAM is a lightweight PHP script that allows you to
19. KoolAjax
KoolAjax facilitates data exchange between server-side and c
20. KoolTreeView
KoolTreeView is a unique treeview control for PHP.

DownloadTube Editor Reviews

 
1. Sudoku Solver Software
Sudoku Solver Software is a simple yet smart and reliable to...
2. Easy PC Firewall
WARNING: According to avast! 4.8, Easy PC Firewall contains ...
3. Anti Tracks Kit
Anti Tracks Kit is a simple yet powerful and reliable softwa...
4. PerfectClock Trader Edition
PerfectClock Trader Edition is a FREEWARE, feature limited v...
5. ProLingo Italian to English Dictionary
ProLingo Italian to English is a really nice, easy to use, a...
6. Tinysoar dvd to ipod converter
Tinysoar dvd to ipod converter will allow you to easily copy...
7. Tinysoar ipod value pack
Tinysoar ipod value pack includes the Tinysoar dvd to ipod c...
8. Tinysoar ipod video converter
Tinysoar ipod video converter is a simple to use tool that c...
9. Financial Icon Library
Vista Financial Icon Library is a stunning collection of mon...
10. Tinysoar iphone video converter
Tinysoar iphone video converter is a smart, simple tool that...

Software Reviews Full List



Top Downloads

 
1. Canon PIXMA iP1000 Printer Driver
2. Canon PIXMA iP1200 Printer Driver x64 d
3. Canon PIXMA iP1200 Printer Driver
4. Realtek ALC/ 262/ 265/ 268/ 660/ 861/ 880/ 882/ 883/ 885/ 888 Audio
5. Canon PIXMA iP1300 Printer Driver a
6. Canon PIXMA MP210 MP Drivers
7. Canon PIXMA MP160 MP Drivers xp64
8. Canon PIXMA iP1600 Printer Driver
9. Canon PIXMA MP160 MP Drivers 9xME
10. Canon PIXMA iP1300 Printer Driver c
11. Asus EZVcr II
12. Canon i-SENSYS LBP2900 Printer Driver R
13. Canon LaserShot LBP-1210 Printer Driver
14. Realtek RTL8139C(L)+/RTL8139D(L)/RTL8100(L)/RTL8130/RTL8139B(L) Driver
15. Realtek RTL8100B(L)/RTL8100C(L)/RTL8101L/RTL8139C(L) Driver XP
16. Canon i560 Printer Driver
17. SendSong
18. Alcatel SpeedTouch 330/USB
19. Mercury KPC-6225V-MH
20. Epox EP-8RDA3+ Bios