Newsgroup: it.comp.lang.javascript
Titolo: primo sub aperto...

Aiuto...vorrei far aprire la mia pagina con il primo sub menu già aperto...
Ho provato con onLoad e onLoadpage ma non funziona, qualcuno mi potrebbe
dare una dritta perfavore?
grazie,
marco
<html>
<head>
<title>Prova Menu</title>
 <script language="JavaScript1.2">
function doMenu(id,display) {
 document.getElementById(id).style.display   = display;
}
</script> <style type="text/css">
.menu {
font-family: Arial, Times, serif;
font-size: 11px;
color: #ffffff;
text-decoration: none;
}
.sub {
    font-family: Arial, Times, serif;
font-size: 10px;
color: #ffffff;
 display: none;
 color: white;
 text decoration: none;
}
</style>
</head>
<body bgcolor="000000" link="#C0C0C0" vlink="#C0C0C0" alink="#C0C0C0"
leftmargin="0" topmargin="0" rightmargin="0" marginwidth="0"
marginheight="0">
<table width="80%" height="399" border="0" cellpadding="0" cellspacing="0"
bordercolor="#FFFFCC" bgcolor="#000000">
  <tr>
    <td colspan="3" align="right" valign="top" bordercolor="#FFFFFF"
bgcolor="#000000">
      <map name="Map">
        <area shape="rect" coords="27, 6, 58, 20" href="#" target="_blank">
        <area shape="rect" coords="62, 7, 118, 19" href="home"
target="_parent">
        <area shape="rect" coords="121, 8, 171, 19" href="jump.cfm?sect=who"
target="_parent">
        <area shape="rect" coords="176, 5, 253, 21" href="#"
target="_blank">
        <area shape="rect" coords="255, 8, 306, 20" href="prodotti"
target="_parent">
        <area shape="rect" coords="309, 7, 441, 20" href="promo"
target="_parent">
        <area shape="rect" coords="443, 7, 505, 20" href="contatti"
target="_parent">
      </map> &nbsp; <p align="right">&nbsp;</p>
      <div id="menuLayer" style="position: absolute; left: 209px; top: 9px;
width: 200; height: 600; z-index: 3; visibility: visible">
        <b id="menu1"><a href="#"
onMouseDown="doMenu('menu1sub','block');doMenu('menu2sub','none');doMenu('me
nu3sub','none');doMenu('menu4sub','none');doMenu('menu5sub','none');doMenu('
menu6sub','none')">
        <p class="menu">Daily Shampoo</p>
        </a></b> <b id="menu1sub" class="sub"> <a href="#" >For Hair-Fall
Prevention</a><br />
        <a href="#">For Normal To Dry Hair</a> <br />
        <a href="#">For Normail Oily Hair</a><br />
        <a href="#">Hair Revitalising Pack</a> </b> <b id="menu2" ><a
href="#"
onMouseDown="doMenu('menu2sub','block');doMenu('menu1sub','none');doMenu('me
nu3sub','none');doMenu('menu4sub','none');doMenu('menu5sub','none');doMenu('
menu6sub','none')">
        <p class="menu">Special Shampoo</p>
        </a></b> <b id="menu2sub" class="sub"> <a href="#" >For Dry Hair And
Scalp</a><br />
        <a href="#">For Oily Hai And Scalp</a><br />
        <a href="#">Platinum Shampoo</a><br />
        </b> <b id="menu3"><a href="#"
onMouseDown="doMenu('menu3sub','block');doMenu('menu2sub','none');doMenu('me
nu1sub','none');doMenu('menu4sub','none');doMenu('menu5sub','none');doMenu('
menu6sub','none')"> <b id="menu3"><a href="#"
onmousedown="doMenu('menu3sub','block');doMenu('menu2sub','none');doMenu('me
nu1sub','none');doMenu('menu4sub','none');doMenu('menu5sub','none');doMenu('
menu6sub','none')">
        <p class="menu">Special Treatment</p>
        </a></b> <b id="menu3sub" class="sub"> <a href="#">Astringent</a><br
/>
        <a href="#">Antidandruff</a><br />
        </b> <b id="menu4"><a href="#"
onMouseDown="doMenu('menu4sub','block');doMenu('menu2sub','none');doMenu('me
nu3sub','none');doMenu('menu1sub','none');doMenu('menu5sub','none');doMenu('
menu6sub','none')">
        <p class="menu">Styling</p>
        </a></b> <b id="menu4sub" class="sub"> <a href="#" >Hair Modeling
Wax</a><br />
        <a href="#">Conditioning</a><br />
        <a href="#">Wet Look Cream</a><br />
        <a href="#">Hair Sculpt Jet</a><br />
        <a href="#">Oil No Oil Hair Fluid</a></b> <b id="menu5"><a href="#"
onMouseDown="doMenu('menu5sub','block');doMenu('menu2sub','none');doMenu('me
nu3sub','none');doMenu('menu1sub','none');doMenu('menu4sub','none');doMenu('
menu6sub','none')">
        <p class="menu">Body Line</p>
        </a></b> <b id="menu5sub" class="sub"> <a href="#" >Refreshing
Deodorant</a><br />
        <a href="#">Hair&amp;Body Cleaner</a><br />
        <a href="#">Moisturizing Body Massage</a><br />
        <a href="#">After Shave</a> </b> <b id="menu6"><a href="#"
onMouseDown="doMenu('menu6sub','block');doMenu('menu2sub','none');doMenu('me
nu3sub','none');doMenu('menu1sub','none');doMenu('menu4sub','none');doMenu('
menu5sub','none')">
        <p class="menu">Shave</p>
        </a></b> <b id="menu6sub" class="sub"> <a href="#" >Shaving
Cream</a><br />
        <a href="#">Pre-Shave Gel</a><br />
        <a href="#" >After Shave Cream</a> <br />
        </b> </div></td>
  </tr>
</table>
</body>

 dare una dritta perfavore?
cioe' esattamente cosa hai scritto nell'onLoad, ultimamente ho la sfera di
cristallo a riparare ;))
~~
artemis.alpeia

grazie lo stesso ce l'ho fatta anche senza sfera di cristallo...
<SCRIPT FOR=menu1Sub EVENT=block></SCRIPT> ....poi c'è il div....e poi:
onLoad="doMenu('menu1sub','block');
Marco
"artemis.alpeia" <it.i...@alpeia.artemis> ha scritto nel messaggio
news:2vw2a.173354$0v.47...@news1.tin.it...


 onLoad="doMenu('menu1sub','block');
ma questo codice funge solo su ie o anche su nn e mozilla??? Non l'avevo mai
visto prima.
Ciao
Marco Lala

 Marco
@le