con questo codice
<script>
/************************************************** *********/
/** this script is free for any use, but please include **/
/** a link to i-code.co.uk in any redistribution **/
/** Author : Stephen Griffin, www.i-code.co.uk **/
/************************************************** ********/
function startmenu()
{
document.getElementById('menu1').style.display = "none";
document.getElementById('menu2').style.display = "none";
document.getElementById('menu3').style.display = "none";
document.getElementById('menu4').style.display = "none";
}
function menufunc(menuId)
{
if(document.getElementById(menuId).style.display == "none")
{
startmenu();
document.getElementById(menuId).style.display = "block";
}
else
{
startmenu();
}
}
</script>
</head>
<body onLoad="javascript:startmenu()">
<table width="100%">
<tr>
<td valign="top" width="20%">
Search Engines
<div id="menu1">
- Ask Jeeves
- AltaVista
</div>
www.i-code.co.uk
<div id="menu2">
- Check for updates
- Request a script
- Contact
- this script
</div>
submenu 3
<div id="menu3">
- my site
- my site
- my site
- my site
</div>
submenu 4
<div id="menu4">
- my site
- my site
- my site
- my site
</div>
</td>
<td valign="top" width="80%">
<p align="center"><tt>
************************************************** ******
**************** page content goes here ****************
************************************************** ******
</tt></p>
<p align="center">
JavaScript by www.i-code.co.uk
</p>
</td>
</tr>
</table>
trovato in internet volevo creare un piccolissimo menù a tendina. Mi sembrava abbastanza semplice e credevo di poterlo configurare (sono una schiappa), ma non c'è stato verso. Se creo una nuova pagina web non ci sono problemi, ma se tento di inserirlo nella cella di una pagina già esistente, non ne vuole sapere. Quale potrebbe essere la causa?