Ciao ragazzi, ho un quesito per voi, la cui risoluzione farebbe molto comodo a me !!
ho questa situazione :
<LINK href="css/globale.css" type=text/css rel="stylesheet">
<LINK rel="alternate stylesheet" type="text/css" href="css/font_small.css" title="small" />
<LINK rel="alternate stylesheet" type="text/css" href="css/font_medium.css" title="medium" />
<LINK rel="alternate stylesheet" type="text/css" href="css/font_large.css" title="large" />
<script type="text/javascript" src="styleswitcher.js" ></script>
</head>
<body bgcolor="#000000" text="#999999" link="#999999" vlink="#999999" alink="#999999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table>
<tr>
<td align="right">
[img]images/a_small.gif[/img]
[img]images/a_medium.gif[/img]
[img]images/a_large.gif[/img]
</td>
</tr>
e questo è il file styleswitcher.js
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;
}
}
}
function getActiveStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
}
return null;
}
function getPreferredStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1
&& a.getAttribute("rel").indexOf("alt") == -1
&& a.getAttribute("title")
) return a.getAttribute("title");
}
return null;
}
ma quando premi il link per attuare la modifica dei caratteri non succede nulla !!!
Potete aiutarmi ???
Grazie. Antonella