News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
24ways.org:
Introducing UDASSS!
December 19, 2005 @ 07:27:01

On our sister site, AjaxDeveloper.org today, there's a new post that references an "Unobtrusive Degradable Ajax Style Sheet Switcher" powered on the backend by PHP - UDASSS.

First of all, the idea is very simple. I wanted something just like what Paul Sowden put together in Alternative Style: Working With Alternate Style Sheets from Alistapart Magazine EXCEPT a few minor (not-so-minor actually) differences which I've listed briefly below:

  • Allow users to switch styles without JavaScript enabled (degradable)
  • Preventing the F.O.U.C. before the window 'load' when getting preferred styles
  • Keep the JavaScript entirely off our markup (no onclick's or onload's)
  • Make it very very easy to implement (ok, Paul did that too)
What I did to achieve this was used server-side cookies instead of JavaScript cookies. Hence, PHP. However this isn't a "PHP style switcher" '" which is where Ajax comes in. For the extreme technical folks, no, there is no xml involved here, or even a callback response. I only say Ajax because everyone knows what 'it' means. With that said, it's the Ajax that sets the cookies 'on the fly'. Got it? Awesome!

The rest of the post is a tutorial on how to use it (simply), and a direct link to download it.

0 comments voice your opinion now!
php ajax usasss Unobtrusive Degradable Ajax Style Sheet Switcher php ajax usasss Unobtrusive Degradable Ajax Style Sheet Switcher



Similar Posts

Justin Silverton\'s Blog: PHP Security Mistakes - Part 2

Ligaya Turmelle\'s Blog: Why use PHP5?

FedoraNews.org: How to install Fedora Core 4 Server with the latest AMP Support

PHPBuilder.com: Bambalam PHP EXE Compiler Now Available

Community News: Call for Papers for AFUP\'s Forum PHP 2006


Community Events









Don't see your event here?
Let us know!


zendframework framework cakephp package job zend database PEAR PHP5 ajax developer releases mysql security example release book application code conference

All content copyright, 2009 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework