Hello, I have a page that I want to implement a font size feature.
Basically it will have the normal size font and for the old foagies it
will allow you to bump up the text. The code I have just sets a
different style sheet:
<link href='styles.css' rel='stylesheet' type='text/css' media='all'
title='styles'>
<link href='styleslarge.css' rel='alternate stylesheet'
type='text/css' media='all' title='styleslarge'>
It basically makes the styleslage.css the stylesheet and the
styles.css the alternate stylesheet.....any way that works fine,
HOWEVER what I woudl like to do is set a cookie so the browser
remembers the text size. Here is the code for that:
function setActiveStyleSheet(title) {
var i, a, main;
for(i=0; (a = document.getElementsByTagName("link")[i]);
i++) {
if(a.getAttribute("rel").indexOf("style") != -1
&& a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title) a.disabled = false;
}
}
}
// This simply changes the text size and sets a cookie
function fontSizerPlus1()
{
document.cookie = "em_styleSheet=styleslarge";
setActiveStyleSheet('styleslarge');
}
function fontSizerwebsite()
{
document.cookie = "em_styleSheet=styles";
setActiveStyleSheet('styles');
}
The problem is, I guess because how asp.net renders HTML when I call
onclick="fontSizerwebsite();" the cookie never gets set. What can I
do? I thought it would help by putting the above javascript in a web
control but that didn't make any difference.
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12herbl97/M=362131.6882499.7825260.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124133604/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/