Hello,
While reading in the W3C pages I discovered that one can create and link several differing style sheets which can be used as alternate style sheets.
I did so, and in Firefox I am given the opportunity to change which style to use on the View, Page Styles menu. However, my selection only sticks for the page I'm on, if I load another page it is in the default style again, and if I go back to the first page it is once again in the default style, the settings don't stick.
Also, I am told by a friend of mine who uses Internet Explorer that the the second [last] style sheet specified is loaded as the default style, and she was not presented with any mechanism to change styles within IE. Why doesn't IE load the default [first] style sheet as per the W3C?
So, what I'd like to do ideally is create a script in javascript which will interact with a button or a drop down list that allows users of my web site to change between styles.
Is it possible to specify which style sheet to use with javascript and make it stick across all the pages?
Later, Ray Parrish
Page 1 of 1
Alternating Style Sheets Can alternate style sheets be changed out programmatically?
#1
Posted 13 November 2008 - 06:31 PM
Later, Ray Parrish
Listen to my brilliant guitar playing !!
The Unknown Lead Player
Linux dpkg Software Report
Ray's Links, Human reviewed link index
Writings of the Schizophrenic
Listen to my brilliant guitar playing !!
The Unknown Lead Player
Linux dpkg Software Report
Ray's Links, Human reviewed link index
Writings of the Schizophrenic
#2
Posted 13 November 2008 - 06:58 PM
LOL! Well, I should have done a little more reading first! I found an example on W3C that show how to change style sheets with a button and javascript, so now I think I can write a change style function.
Now...how to make the selection stick as the user changes pages? Do I need to write a cookie for this?
Later, Ray Parrish
Now...how to make the selection stick as the user changes pages? Do I need to write a cookie for this?
Later, Ray Parrish
Later, Ray Parrish
Listen to my brilliant guitar playing !!
The Unknown Lead Player
Linux dpkg Software Report
Ray's Links, Human reviewed link index
Writings of the Schizophrenic
Listen to my brilliant guitar playing !!
The Unknown Lead Player
Linux dpkg Software Report
Ray's Links, Human reviewed link index
Writings of the Schizophrenic
#3
Posted 13 November 2008 - 07:07 PM
Cookies are the only way that I can think of to do it, unless the user's preferences are kept in a database and correlated with a unique user id.
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens
#4
Posted 13 November 2008 - 08:22 PM
Thanks again, I'm reading up on cookies now at the W3C, it's a great reference!
Later, Ray Parrish
Later, Ray Parrish
Later, Ray Parrish
Listen to my brilliant guitar playing !!
The Unknown Lead Player
Linux dpkg Software Report
Ray's Links, Human reviewed link index
Writings of the Schizophrenic
Listen to my brilliant guitar playing !!
The Unknown Lead Player
Linux dpkg Software Report
Ray's Links, Human reviewed link index
Writings of the Schizophrenic
Share this topic:
Page 1 of 1

Help



Back to top









