Greetings! I am trying to provide a way to the user to increase the font size for our portal site. The site uses Master pages so I put the link tags in the master page and in the content page I added a simple drop-down list with the list of the stylesheets
available. I added this javascript code to the content page to change the stylesheet:
When I debug the code, I can see that the value of the stylesheet has changed but the text doesn't change. I tried to track it using the IE developer toolbar and FireBug but couldn't find much. Can someone throw some light on what I could do to make this
work? In essence the functionality is to give the visually impaired to see the text in larger font if they want to.
rajthomson
Member
1 Points
11 Posts
Alternate stylesheets with Master pages and content
Jun 18, 2007 02:45 PM|LINK
Greetings! I am trying to provide a way to the user to increase the font size for our portal site. The site uses Master pages so I put the link tags in the master page and in the content page I added a simple drop-down list with the list of the stylesheets available. I added this javascript code to the content page to change the stylesheet:
I call this from the code as in:When I debug the code, I can see that the value of the stylesheet has changed but the text doesn't change. I tried to track it using the IE developer toolbar and FireBug but couldn't find much. Can someone throw some light on what I could do to make this work? In essence the functionality is to give the visually impaired to see the text in larger font if they want to.
Thank you for your time.
Regards, Kumar
ca8msm
Star
12439 Points
2153 Posts
Re: Alternate stylesheets with Master pages and content
Jun 18, 2007 03:14 PM|LINK
Have you considered doing this in server side code? If your users don't have javascript then the solution won't work for them anyway.
For a server-side solution you can make the link tag runat="server" and simply change the href attribute.
Website Design Darlington - http://lessthandot.com -
http://aspnetlibrary.com
kalvagadda
Participant
1513 Points
281 Posts
Re: Alternate stylesheets with Master pages and content
Jun 18, 2007 03:23 PM|LINK
Hi,
In function setActivestylesheet(pTitle) you disabled all other styles except pTitle.
That's good. but you didn't change rel attribute, they still are "alternate stylesheet". you need to change rel attribute to "stylesheet".
Thanks,
Kiran
SolitaryMan
Member
154 Points
275 Posts
Re: Alternate stylesheets with Master pages and content
Jun 22, 2007 06:49 PM|LINK
@Mark
We don't design for people who don't have JavaScript...