Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 15th, 2007, 10:33 AM
Registered User
 
Join Date: May 2007
Location: Williamsport, PA, USA.
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=/";

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 10:39 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.