My goal is to increase/decrease the size of the text on my site via a single click. I copied the skin-switching code from the DNN site but nothing (other than a page refresh) happens when clicking the links.
I am feeling a bit dense here... I am not sure how setting a cookie value to change skins is supposed to work. How does DNN know which skin to use? If I have 10 skins with different names on my site, just providing a number (e.g., 0, 1, 2) does not seem to be enough info to indicate the correct skin. Is the skin supposed to have a specific name with a numeric value appended to the end?
And please let me know if there is a better way to change font sizes other than switching skins.
Thanks in advance for your wisdom!
Code copied from DNN site:
<script language="Javascript">
function setSkinCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
}
</script>
<script language="Javascript">
function sizeText(size)
{
setSkinCookie("DotNetNuke_Skin_Text_Size", size, new Date("December 31, 2010 23:59:59"),"/");
location.reload();
}
</script>
<a href=" void(0)"><img src="/Portals/_default/Skins/DNN-Minimal/controls/images/icon_textsmall_on.gif" onClick="sizeText(0)" width="17" height="17" alt="Small text" border="0"></a>
<a href=" void(0)"><img src="/Portals/_default/Skins/DNN-Minimal/controls/images/icon_textmedium.gif" onClick="sizeText(1)" width="17" height="17" alt="Medium text" border="0"></a>
<a href=" void(0)"><img src="/Portals/_default/Skins/DNN-Minimal/controls/images/icon_textlarge.gif" onClick="sizeText(2)" width="17" height="17" alt="Large text" border="0"></a>