View Full Version : Style Sheet Switcher (v1.0)

11-21-2005, 05:04 PM

I'm looking at the Style Sheet Switcher (v1.0). http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm A bit old school I know, but perfect for this intranet I'm working on. What I want is to give the option of having 800x600,1024x768 etc (there is an incredible array of monitor size/resolution here - fluid won't work as an option, hence the switch).

Anyhoo - it works like a charm of course, but want I need now from it is that it "remembers" the selection throughout the site for each user - I guess it needs to write a cookie to the client machine. Any ideas how I can achieve this would be most appreciated


11-22-2005, 08:04 AM
Actually, JavaScript cookies by default already do what you're asking, which is store the selection on the client's machine (hence is user specific). With this script, the user selection should also persist across the entire site, by site I mean across a domain...

11-22-2005, 05:18 PM
That's what I thought - but when the user goes to another page after chhosin the alternate style sheet it goes back to the default style sheet. I must be missing something really obvious but I'm not sure what

11-22-2005, 11:49 PM
Ignore me, I'm an idiot - helps if you read the page properly

"his script must appear as the last item in the HEAD, below any external style sheet definitions (<link>):!