Does anyone know a way either through javascript or DHTML to have your style sheets change automatically upon a certain date or season.
I've seen switchers that work with buttons, and I've seen scripts that can change page backgrounds based on months or seasons, but I cannot find a way to do style sheets automatically.
WARNING: I'm a beginner, at best, when it comes to javascript. My forte lies in HTML and CSS.
Working web site is not the one that looks the same in a few graphical browsers, but the one that adequately delivers its content to any device accessing it.
If I don't know javascript, that still doesn't solve my problem. It doesn't matter, server side or client side, if I don't know what it takes to do it.
Okay... I sort of understand what that PHP script does, but how can I get it to work for seasonal changes? I'm putting together a website for a client that wants to run seasonal specials for their merchandise. I've designed the entire page using style sheets instead of tables and when the season's change (approx - know it don't be to the minute exactly) I want the script to call the proper style sheet.
Again, though, scripting languages aren't my strong suit. Explain it to me as though I were an idiot...okay, maybe not an idiot but you get the picture.
Actually, that will just allow the cookie to expire. The original script was meant to be used to allow users to change their stylesheets. If you want to load a different stylesheet based on the time of year, it would be much easier, as all you'd have to do is use PHP's date() functions to get the current month and display the corresponding stylesheet.
I have a somewhat unrelated question. Let's say I have two stylesheets and after the user picks the second one, will there be a slight, but noticable change in the layout as it goes from the default layout to the newer one if you use a PHP style sheet switcher? I ask because I have gone to meyer's website and picked different style sheets only to see this switch like effect happening. I know his style sheet switcher is done via JavaScript. I also have a 56K connection so page loads will be slower than for a high speed connection.
No, there shouldn't be. You can see a demo of the PHP version running at http://www.webdevfaqs.com/. The only thing you will be likely to notice would be images loading...
Bookmarks