FORUMS: list search recent posts

CSS + Cookies + Javascript

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Noor KhazalCSS + Cookies + Javascript
by on Mar 28, 2010 at 9:24:37 pm

Hey there..

I'm having a really hard time figuring out cookies, im reading alot about it atm and its still pretty confusing.

Ive created a site that gives you the chance to change the BG color by jquery telling css what bgcolor should be setting..

I dont know how to "save" the color of choice to the client-side so that each time a visitor comes back, their choice isnt forgotten..

dont know if it makes sense but thanks anyways!..

Return to posts index

Fernando MolRe: CSS + Cookies + Javascript
by on Mar 29, 2010 at 8:57:54 pm

A cookie is a little file saved in the computer of the user. There you can save a value for a variable, then use the variable in your page.

In your example, you can save the color for the BG in the cookie, then load it each time the user enter your site.

I don't have an example for the code you need, but you can take a look in the w3schools to understand how cookies work.

*Always share a link to your site and rate the posts. This is a free service for you and for us.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved