Download the Styleswithcer
Get Styleswitcher, version 2.03.
NEW: Get the PHP 5 compatible version.
One of the greatest features of using stylesheets (Cascading Style Sheets) in developing web sites is the ability to dynamically change the layout or style of a page. The mechanism that allows a style to be changed is called a "styleswitcher".
There are two basic types of styleswitchers: client-side and server-side. Client-side styleswitchers use JavaScript to change stylesheets and run on the client's machine. Server-side styleswitchers change the styles while running on the server. The principle advantage of the PHP (or other server side language) styleswitchers is client's browser does not need to have JavaScript turned on or have a modern browser capable of running the scripts. Both versions of the styleswitcher require the user to have cookies enabled.
After an article by Chris Clark ran on A List Apart in 2002, I developed what I hoped was an alternative styleswitcher. Over the past few months I have developed a new version of the styleswitcher that can switch multiple stylesheets.
For more information, please visit the web site for the PHP Styleswitcher, Version 2.
NOTE: The Styleswitcher code has been updated for PHP 5, so please download the new version. If you are currently using the styleswitcher and have switched to PHP 5, you should not have to change your code [August 20, 2006].
The styleswitcher was created for PHP version 4.2 by Rob Ballou. It has been updated to allow it to be used for PHP 5. As of version 2.03 of the styleswitcher, PHP 4 will no longer be supported.
Copyright © 2002 - 2008 Rob Ballou. All Rights Reserved.
Last updated: March 07, 2008 09:07