Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Color Palette

Status
Not open for further replies.

newfrontiers

Programmer
Oct 17, 2001
134
US
Hello. I would like to add the ability for a user to modify the color of a heading on a web site. Does anyone have a recommendation on a good applet or some code that I could include that will show a color palette, allow the user to select a color and when clicking Ok will transfer the hex color to a database to modify the heading?

Thanks.

John

 
Have you ever implemented writing data from the browser through to a database (presumably server-side) before?

I suggest you start off with just a single form and field... type in the number manually and submit the form... performing the server-side task of writing it to a database at that stage. Once you have that working properly, you can then look to implementing a colour picker (which will effectively set a value into the field and submit the form in the background).

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Jeff, thank you for the followup and the suggestion. I have yet to implement because my real issue is providing a user with the palette to choose a color from and then once clicked have the db field populated. I am looking at several freeware and for purchase software products that may enable me to do this. Thanks again for the suggestion.

regards,

John

 
My thoughts:

1. Let your users choose a color from a color picker... there is many out there:

Prototype based -
Yahoo(YUI) and dojo has one too.

2. Upon selection of the color, change the styles via javascript accordingly.

3. If you want to allow the users to keep the chosen color, save it to a cookie, or if you already have a registered user database sytem then use the db.

Let us know your results!

X
 
I'll agree with X on this one,

No need for any server-side work or databases really, just a little javascript and a CSS style would do the job, although i'm not sure how you could store thier settings for future visits.

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top