Wrox Programmer Forums
|
BOOK: Professional CSS: Cascading Style Sheets for Web Design
This is the forum to discuss the Wrox book Professional CSS: Cascading Style Sheets for Web Design by Christopher Schmitt, Mark Trammell, Ethan Marcotte, Dunstan Orchard, Todd Dominey; ISBN: 9780764588334
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional CSS: Cascading Style Sheets for Web Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 15th, 2007, 11:33 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default JavaScript Style Switcher Tip

Here is a tip for you. I tried the JavaScript CSS Switcher on page 299 and it works very well. However, it only worked on one page in the site. I wanted to have one page where you could switch the style and then navigate to any page in the site with the same style applied.

The key to doing this is to set the cookie path so the current document can share cookie information with other pages within the same domain. Change the line in the setCookie function to read:

var expires = ";expires"+date.toGMTString()+";path=/";






Similar Threads
Thread Thread Starter Forum Replies Last Post
tool tip in xsl vighna XSLT 2 August 31st, 2007 03:58 PM
Tool Tip MunishBhatia ASP.NET 2.0 Professional 2 May 11th, 2007 05:39 PM
javascript tip-of-the-day sent by email crmpicco Javascript 0 September 13th, 2005 07:53 AM
changing style using javascript mattastic Javascript 3 September 21st, 2004 09:57 AM
difference between style.visibility and style.disp Mimi Javascript How-To 6 September 17th, 2003 11:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.