cerco lo script di un menù tipo quello di poste.it. quel menù che ti segue man mano che scorri la pagina verso il basso. sapete dirmi qualcosa?
Grazie
cerco lo script di un menù tipo quello di poste.it. quel menù che ti segue man mano che scorri la pagina verso il basso. sapete dirmi qualcosa?
Grazie
Ciao.
Puoi vedere su http://www.waldorfcomo.org
in Scuola elementare > La Scuola trovi quello che ti interessa.
Visualizza html e guarda il codicr javascript che ho usato
non sono riuscito a capire qual è il codice che si riferisce al menù
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function setVariables() {
if (navigator.appName == "Netscape") {
v=".top=";
dS="document.";
sD="";
y="window.pageYOffset";
}
else {
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
}
}
function checkLocation() {
object="object1";
yy=eval(y);
eval(dS+object+sD+v+yy);
setTimeout("checkLocation()",10);
}
// End -->
</script>
tra i tag <head></head>
mentre fra i tag <body></body> questo:
<body MARGINHEIGHT="0" TOPMARGIN=0 bgcolor="#FFFFCC" OnLoad="setVariables();checkLocation()">
<div id="object1" style="position:absolute; visibility:visible; left:0px; top:0px; z-index:2">
<table width="205" border="0" cellspacing="1" cellpadding="1">
<tr valign="top">
<td> [img]images/punto_red.gif[/img]
<table width=180 border=0 cellspacing=1 cellpadding=0 bgcolor="#DDDDDD">
<tr bgcolor="#99CC99">
<td>
<div align="center"><font color="#000000" size="1" face="Arial, Verdana, Times New Roman">S
c u o l a E l e m e n t a r e</font> </div>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#FFCC99"> <a href="#top" target="_self">
[img]images/punto_red.gif[/img]
</a><a href="elementare.htm#top" target="_self">P e d a g o g i
a</a>
[img]images/001.gif[/img]</td>
</tr>
<tr>
<td valign="top" bgcolor="#FFCC66"> [img]images/punto_red.gif[/img]
<a href="elementare1.htm#programmi" target="_self">P r o g r a m
m i</a>
[img]images/001.gif[/img]</td>
</tr>
<tr>
<td valign="top" bgcolor="#FFCC33"> [img]images/punto_red.gif[/img]
E p o c h e
[img]images/001.gif[/img]</td>
</tr>
<tr>
<td valign="top" bgcolor="#FFCC00"> [img]images/punto_red.gif[/img]
M u s i c a
[img]images/001.gif[/img]</td>
</tr>
<tr bgcolor="#CCCC00">
<td valign="top"> [img]images/punto_red.gif[/img]
<a href="elementare.htm#euritmia" target="_self">E u r i t m i a
</a>
[img]images/001.gif[/img]</td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCC00"> [img]images/punto_red.gif[/img]
Lingue straniere
[img]images/001.gif[/img]</td>
</tr>
<tr bgcolor="#999900">
<td valign="top">[img]images/punto_red.gif[/img]
Obiettivi e Didattica
[img]images/001.gif[/img]</td>
</tr>
<tr bgcolor="#999900">
<td valign="top"> [img]images/punto_red.gif[/img]
Immagini delle classi
[img]images/001.gif[/img]</td>
</tr>
<tr bgcolor="#99CC99">
<td valign="top">[img]images/punto_red.gif[/img]
<a href="newsletter.htm" target="_self">Iscriviti alla newsletter
</a>
[img]images/001.gif[/img]</td>
</tr>
<tr bgcolor="#CCCC00">
<td valign="top">
<div align="left">[img]images/downdisk.gif[/img][img]images/punto_red.gif[/img]<a href="pof_%20elementare.zip">Scarica
il
Piano dell'Offerta Formativa</a>
[img]images/001.gif[/img]</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
Che è il layer che contiene una table dove ci sono tutti i link del menu a sx
Prova a copiare ed incollare nel tuo editor il codice poi dimmi...
non capisco bene il codice e comunque io non voglio fare il sito con i frames. Se mi indirizzate verso qualche sito di risorse dove lo posso trovare forse sarà tutto più facile!!
Che il sito sia fatto coi frames o no non ha nessuna importanza
Eccoti la versione semplificata.
<html>
<head>
<title>Menu scroll</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function setVariables() {
if (navigator.appName == "Netscape") {
v=".top=";
dS="document.";
sD="";
y="window.pageYOffset";
}
else {
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
}
}
function checkLocation() {
object="object1";
yy=eval(y);
eval(dS+object+sD+v+yy);
setTimeout("checkLocation()",10);
}
// End -->
</script>
</head>
<body MARGINHEIGHT="0" TOPMARGIN=0 bgcolor="#FFFFCC" OnLoad="setVariables();checkLocation()">
<div id="object1" style="position:absolute; visibility:visible; left:0px; top:0px; z-index:1; background-color: #FF0000; layer-background-color: #FF0000; border: 1px none #000000;">
<table width="205" border="0" cellspacing="1" cellpadding="1">
<tr valign="top">
<td><font color="#FFFFFF">Qui vanno i link che scrollano con la pagina.</font></td>
</tr>
</table>
</div>
<table width="99%" height="650" border="2" cellpadding="1" cellspacing="1">
<tr>
<td></td>
</tr>
</table>
</body>
</html>
In buona sostanza si tratta di un layer che contiene quello che ci vuoi mettere che scrolla con la pagina.