Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-26-2006, 08:52 PM   PM User | #1
Andy92
Regular Coder

 
Andy92's Avatar
 
Join Date: Nov 2005
Location: Horsham, West Sussex, UK
Posts: 363
Thanks: 7
Thanked 1 Time in 1 Post
Andy92 is an unknown quantity at this point
Let the user select the css stylesheet

Hi there,

Is there any way that i can make something that goes on my site in every page, where the user clicks on a selected style and it will use a seperate stylesheet.

Eg: A user wants my site in red, so they click on the red style and it will use only parts of a seperate stylesheet. So it changes the background to red, but still reads the old stylesheet but everything i put in the red stylesheet it will use and overwrite what it says in the old stylesheet.

This way the user will be able to choose what style they like my site in.

Also, is there any way it can make a cookie and store it so that the next day when they go back to my site, it will display the same style that they chose the previous day?

Is there any way to do this using php or javascript?

__________________
@Andy92 / Dribbble
Andy92 is offline   Reply With Quote
Old 08-26-2006, 09:36 PM   PM User | #2
Kravvitz
Senior Coder

 
Join Date: Feb 2006
Location: USA
Posts: 1,013
Thanks: 0
Thanked 0 Times in 0 Posts
Kravvitz is an unknown quantity at this point
Yes.

You want a stylesheet switcher.

Avoid scripts found on DynamicDrive.
__________________
Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions
Java != JavaScript && JScript != JavaScript
Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.
Kravvitz is offline   Reply With Quote
Old 08-26-2006, 11:37 PM   PM User | #3
Andy92
Regular Coder

 
Andy92's Avatar
 
Join Date: Nov 2005
Location: Horsham, West Sussex, UK
Posts: 363
Thanks: 7
Thanked 1 Time in 1 Post
Andy92 is an unknown quantity at this point
Ok,

I have had a look at this one...

http://www.alistapart.com/stories/alternate/

And i can't get it to work on my site?
__________________
@Andy92 / Dribbble
Andy92 is offline   Reply With Quote
Old 08-27-2006, 04:14 AM   PM User | #4
Kravvitz
Senior Coder

 
Join Date: Feb 2006
Location: USA
Posts: 1,013
Thanks: 0
Thanked 0 Times in 0 Posts
Kravvitz is an unknown quantity at this point
You set the rel attributes wrong in two of the <link> elements.
__________________
Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions
Java != JavaScript && JScript != JavaScript
Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.
Kravvitz is offline   Reply With Quote
Old 08-28-2006, 01:05 AM   PM User | #5
Andy92
Regular Coder

 
Andy92's Avatar
 
Join Date: Nov 2005
Location: Horsham, West Sussex, UK
Posts: 363
Thanks: 7
Thanked 1 Time in 1 Post
Andy92 is an unknown quantity at this point
Ok thanks,

But i have followed a different turorial now and its all done with php.

It works fine. I am still working on it, but it works on the home page.

Have a look at http://www.allsortshop.com

Thanks!
__________________
@Andy92 / Dribbble
Andy92 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:59 PM.


Advertisement
Log in to turn off these ads.