Ragazzi sapreste aiutarmi a modificare questo menu?? Come è ora funziona benissimo, è un menu laterare, clicco su una voce principale e si espande il menu, io vorrei che quando clicco una voce mi si chiudano tutte le altre, ma non so come modificarlo, vi posto il codice completo, vedete se potete aiutarmi.
Grazie
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.testoP {
font-family: Tahoma;
font-size: 9pt;
color: #FFFFFF;
font-weight: bold;
text-indent: 3pt;
}
.testoS {
font-family: Tahoma;
font-size: 8pt;
color: #003063;
font-weight: bold;
text-indent: 5pt;
}
-->
</style>
<SCRIPT LANGUAGE=javascript>
function visualizza(numTab, numMaxArray) {
strTab = numTab;
strNumArray = numMaxArray
var arrayTab = new Array();
for (n = 0; n < strNumArray; n++)
{
arrayTab[n] = strTab+"_"+(n+1);
}
for (i = 0; i < strNumArray; i++)
{
strTabCambia = document.getElementById(arrayTab[i]);
old = strTabCambia.style.display;
strTabCambia.style.display = "block";
if (old=="block")
{
strTabCambia.style.display = "none";
}
}
}
</SCRIPT>
</head>
<body onLoad="visualizza('tab1', 3)">
</p>
<table width="130" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#3B4866" width="130" height="22"></td>
</tr>
<tr>
<td width="130" height="23" bgcolor="#7489B9" class="testoP" style="Cursor:Hand" onClick="visualizza('tab1', 3)"> Primo
Tab </td>
</tr>
<tr id="tab1_1" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Primo Tab </td>
</tr>
<tr id="tab1_2" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Primo Tab </td>
</tr>
<tr id="tab1_3" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Primo Tab </td>
</tr>
<tr>
<td width="130" height="23" bgcolor="#7489B9" class="testoP" style="Cursor:Hand" onClick="visualizza('tab2', 3)">
Secondo Tab </td>
</tr>
<tr id="tab2_1" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Secondo Tab </td>
</tr>
<tr id="tab2_2" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Secondo Tab </td>
</tr>
<tr id="tab2_3" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Secondo Tab </td>
</tr>
<tr>
<td width="130" height="23" bgcolor="#7489B9" class="testoP" style="Cursor:Hand" onClick="visualizza('tab3', 3)">
Terzo Tab </td>
</tr>
<tr id="tab3_1" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Terzo Tab </td>
</tr>
<tr id="tab3_2" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Terzo Tab </td>
</tr>
<tr id="tab3_3" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Terzo Tab </td>
</tr>
<tr>
<td width="130" height="23" bgcolor="#7489B9" class="testoP" style="Cursor:Hand" onClick="visualizza('tab4', 1)">
Quarto Tab </td>
</tr>
<tr id="tab4_1" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Quarto Tab </td>
</tr>
<tr>
<td width="130" height="23" bgcolor="#7489B9" class="testoP" style="Cursor:Hand" onClick="visualizza('tab5', 5)">
Quinto Tab </td>
</tr>
<tr id="tab5_1" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Quinto Tab </td>
</tr>
<tr id="tab5_2" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Quinto Tab </td>
</tr>
<tr id="tab5_3" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Quinto Tab </td>
</tr>
<tr id="tab5_4" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Quinto Tab </td>
</tr>
<tr id="tab5_5" style="display:none">
<td width="130" height="17" bgcolor="#C6D4F5" class="testoS" style="Cursor:Hand" onClick="alert('ok')">
Quinto Tab </td>
</tr>
<tr>
<td width="130" height="25" bgcolor="#3B4866"></td>
</tr>
</table>
</body>
</html>