Mi scuso in anticipo per la lunghezza del messaggio.
Questo è quanto scritto all'interno dei tag <body></body> e servono per far funzionare un menù.
La frase scritta in rosso crea una voce(apri menù)che, cliccata, apre tutte le altre. Io la volevo cancellare. Eliminata la stringa in rosso il menù continua a funzionare ache se ha eliminato la stringa di prima.
<strong><a HREF="#" onClick="expandAll(false); return false"><img NAME="imEx" SRC="down.gif" WIDTH="16" HEIGHT="14" BORDER="0" ALT="Mostra/Nascondi tutti"> apri menu</a></strong>
<div ID="elOneParent" CLASS=parent>
<h3><a href="#" onClick="expandIt('elOne'); return false">
<img NAME="imEx" SRC="down.gif" WIDTH="16" HEIGHT="14" BORDER="0" ALT="voce 1">
Voce1</a></h3></div>
<div ID="elOneChild" CLASS="child">
<a href="link.htm">sottovoce1.1</a><br>
<a href="link.htm">sottovoce1.2</a><br>
<a href="link.htm">sottovoce1.3</a><br>
<a href="link.htm">sottovoce1.4</a><br><br>
</div>
<div ID="elTwoParent" CLASS=parent>
<h3><a href="#" onClick="expandIt('elTwo'); return false">
<img NAME="imEx" SRC="down.gif" WIDTH="16" HEIGHT="14" BORDER="0" ALT="voce 1">
Voce2</a></h3></div>
<div ID="elTwoChild" CLASS="child">
<a href="link.htm">sottovoce2.1</a><br>
<a href="link.htm">sottovoce2.2</a><br>
<a href="link.htm">sottovoce2.3</a><br>
<a href="link.htm">sottovoce2.4</a><br><br>
</div>
<div ID="elThreeParent" CLASS=parent>
<h3><a href="#" onClick="expandIt('elThree'); return false">
<img NAME="imEx" SRC="down.gif" WIDTH="16" HEIGHT="14" BORDER="0" ALT="voce 1">
Voce3</a></h3></div>
<div ID="elThreeChild" CLASS="child">
<a href="link.htm">sottovoce3.1</a><br>
<a href="link.htm">sottovoce3.2</a><br>
<a href="link.htm">sottovoce3.3</a><br>
<a href="link.htm">sottovoce3.4</a><br><br>
</div>
<div ID="elFourParent" CLASS=parent>
<h3><a href="#" onClick="expandIt('elFour'); return false">
<img NAME="imEx" SRC="down.gif" WIDTH="16" HEIGHT="14" BORDER="0" ALT="voce 1">
Voce4</a></h3></div>
<div ID="elFourChild" CLASS="child">
<a href="link.htm">sottovoce4.1</a><br>
<a href="link.htm">sottovoce4.2</a><br>
<a href="link.htm">sottovoce4.3</a><br>
<a href="link.htm">sottovoce4.4</a><br><br>
</div>
<div ID="elFiveParent" CLASS=parent>
<h3><a href="#" onClick="expandIt('elFive'); return false">
<img NAME="imEx" SRC="down.gif" WIDTH="16" HEIGHT="14" BORDER="0" ALT="voce 1">
Voce5</a></h3></div>
<div ID="elFiveChild" CLASS="child">
<a href="link.htm">sottovoce5.1</a><br>
<a href="link.htm">sottovoce5.2</a><br>
<a href="link.htm">sottovoce5.3</a><br>
<a href="link.htm">sottovoce5.4</a><br><br>
</div>
<script LANGUAGE="JavaScript1.2">
if (NS4) {
firstEl="elOneParent";
firstInd=getIndex(firstEl);
document.layers[firstInd].pageY-=1;
showAll();
arrange();}
//-->
</script>
ma mi sono accorto che nello script tra i tag <head></head> ci sono degli elementi che ora non servono più, e cioè quelli che richiamano una immagine "up" che veniva mostrata qualora utilizzassi la voce "apri menù" (quella che apriva tutte la voci)
Questo lo script:
<style TYPE="text/css">
<!--
A {text-decoration: none; color : Black;}
A:HOVER{ Color : red; }
A:VISITED { text-decoration : none; }
H3 {font-family: Verdana,Arial,Helvetica;font-size:9pt;font-weight:bold;}
TT{font-family:monospace;}
B I{color:#993366;font-size:100%;}
DIV,TD{font-family:Verdana,Arial,Helvetica;font-size:12px;}
SPAN SMALL{font-size:80%;}
SPAN.times{font-family:Times New Roman,Times,serif;font-size:100%;}
-->
</style>
<script language="JavaScript" type="text/javascript">
<!--
var bV=parseInt(navigator.appVersion);
NS4=(document.layers)?true:false;
IE4=(document.all)?true:false;
ver4=(NS4 || IE4)?true:false;
if (document.images) {
arImLoad=new Array ("up.gif");
arImList=new Array ();
for (counter in arImLoad) {
arImList[counter]=new Image();
arImList[counter].src=arImLoad[counter] + ".gif";
}}
function expandIt(){return}
function expandAll(){return}
//-->
</script>
<script LANGUAGE="JavaScript1.2">
<!--
isExpanded=false;
function reDo(){
window.location.reload() }
function getIndex(el) {
ind=null;
for (i=0; i<document.layers.length; i++) {
whichEl=document.layers
;
if (whichEl.id==el) {
ind=i;
break; }}
return ind; }
function arrange() {
nextY=document.layers[firstInd].pageY + document.layers[firstInd].document.height-10;
for (i=firstInd+1; i<document.layers.length; i++) {
whichEl=document.layers;
if (whichEl.visibility != "hide") {
whichEl.pageY=nextY;
nextY += whichEl.document.height-10; }}}
function initIt() {
if (NS4) {scrollTo(0,pageYOffset-10)
for (i=0; i<document.layers.length; i++) {
whichEl=document.layers;
if (whichEl.id.indexOf("Child") != -1) {
whichEl.visibility="hide";
whichEl.isExpanded=false; }}
arrange();
setTimeout("window.onresize=reDo",1000) }
else {
tempColl=document.all.tags("DIV");
for (i=0; i<tempColl.length; i++) {
if (tempColl(i).className == "child") {
tempColl(i).style.display="none";
tempColl(i).isExpanded=false; }}}}
function expandIt(el) {
if (!ver4) return;
if (IE4) {expandIE(el)} else {expandNS(el) }}
function expandIE(el) {
whichEl=eval(el + "Child");
whichIm=event.srcElement;
if (whichEl.style.display == "none") {
whichEl.style.display="block";
whichEl.isExpanded=true;
whichIm.src="up.gif"; }
else {
whichEl.style.display="none";
whichEl.isExpanded=false;
whichIm.src="down.gif"; }}
function expandNS(el) {
whichEl=eval("document." + el + "Child");
whichIm=eval("document." + el + "Parent.document.images['imEx']");
if (whichEl.visibility == "hide") {
whichEl.visibility="show";
whichEl.isExpanded=true;
whichIm.src="up.gif"; }
else {
whichEl.visibility="hide";
whichEl.isExpanded=false;
whichIm.src="down.gif"; }
arrange(); }
function showAll() {
for (i=firstInd; i<document.layers.length; i++) {
whichEl=document.layers;
whichEl.visibility="show"; }}
function expandAll(isBot) {
newSrc=(isExpanded)?"down.gif":"up.gif";
if (NS4) {
document.images["imEx"].src=newSrc;
for (i=firstInd; i<document.layers.length; i++) {
whichEl=document.layers;
if (whichEl.id.indexOf("Parent") != -1) {
whichEl.document.images["imEx"].src=newSrc; }
if (whichEl.id.indexOf("Child") != -1) {
whichEl.visibility=(isExpanded)?"hide":"show";
whichEl.isExpanded=(isExpanded)?false:true; }}
arrange();
if (isBot && isExpanded) scrollTo(0,document.layers[firstInd].pageY);}
else { divColl=document.all.tags("DIV");
for (i=0; i<divColl.length; i++) {
if (divColl(i).className == "child") {
divColl(i).style.display=(isExpanded)?"none":"block";
divColl(i).isExpanded=(isExpanded)?false:true;}}
imColl=document.images.item("imEx");
for (i=0; i<imColl.length; i++) {
imColl(i).src=newSrc;}}
isExpanded=!isExpanded;}
with (document) {
write("<STYLE TYPE='text/css'>");
write(".parent {");
if (NS4) {write("position:absolute; visibility:hidden;")};
if (IE4) {write("margin-top:-15;")};
write("margin-left:3;");
write("color:#000099");
write("}");
write(".child {");
if (NS4) {write("position:absolute; visibility:hidden;")};
if (IE4) {write("display:none;")};
write("margin-left:3;");
write("}");
write(".other {");
if (NS4) {write("position:absolute; visibility:hidden;")};
write("margin-left:2;");
write("}");
write("</STYLE>");}
function linkIt(whichEl, whichHref) {
lay=(NS4)?eval("document."+whichEl+"Child"):eval(whichEl+"Child");
if (!lay.isExpanded) expandIt(whichEl);
nlay=(NS4)?lay.document.images[whichHref]:document.images[whichHref];
if (NS4) {
sY=nlay.y+lay.pageY-20
window.scrollTo(0,sY);}
else{nlay.scrollIntoView();scroll(0,document.body.scrollTop-2);
nlay.parentElement.style.backgroundColor="#FF99FF";setTimeout("nlay.parentElement.style.backgroundColor='white'",1000);}}
window.onload=initIt;
// -->
</script>
<base target="principale">
Se non vi porta via tanto tempo, mica potreste correggermi lo script??
Grazie in anticipo e rinnovo le scuse per la lunghezza del messaggio.