Newsgroup: it.comp.lang.javascript
Titolo: [AIUTO] DAI RAGA DATEMI UNA MANO.........

ho bisogno di 1 mano ragazzi la  seguente pagina contiene un  menu io dovrei
metterli in verticale e tenerne 1 solo aperto per volta in più se un menu
scende fa scorrerre queli sotto...
mi date una mano per piacere???
grazie in anticipo...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>HTML point - Dynamic HTML</title>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<meta content="HTML point" name="OWNER">
<meta content="Massimiliano Valente - 
vale...@tin.it
" name="AUTHOR">
<meta content="Dynamic HTML - HTML dinamico" name="description">
<meta
content="Dynamic HTML, dinamico, layer, css, fogli di stile, style sheets,
eventi, funzioni, effetti, DHTML"
name="keywords">
<style>BODY {
 BACKGROUND-COLOR: #000000
}
A {
 COLOR: navy; TEXT-DECORATION: none
}
A:hover {
 COLOR: #00ff00
}
A:visited:unknown {
 COLOR: #00ff00
}
TD {
 FONT-FAMILY: federation,helvetica; FONT-SIZE: 10pt
}
DIV.clTopMenu {
 BACKGROUND-COLOR: #000000; CLIP: rect(0px 101px 14px 0px); HEIGHT: 150px;
POSITION: absolute; VISIBILITY: hidden; WIDTH: 101px; Z-INDEX: 31;
layer-background-color: #00ff00
}
DIV.clTopMenuBottom {
 BACKGROUND-COLOR: #000000; CLIP: rect(0px 101px 3px 0px); HEIGHT: 3px;
POSITION: absolute; TOP: 11px; WIDTH: 101px; Z-INDEX: 2;
layer-background-color: #00ff00
}
DIV.clTopMenuText {
 BACKGROUND-COLOR: #000000; FONT-FAMILY: arial,helvetica; FONT-SIZE: 11px;
LEFT: 5px; POSITION: absolute; TOP: 15px; WIDTH: 91px; Z-INDEX: 1
}
</style>
<script>
ie=document.all?1:0
n=document.layers?1:0
file://How many menus do you have? (remember to copy and add divs in the
body if you add menus)
var numberOfMenus=2
file://The width on the menus (set the width in the stylesheet as well)
var mwidth=101
file://Pixels between the menus
var pxBetween=10
file://The first menus left position
var fromLeft=5
file://The top position of the menus
var fromTop=5
file://The bgColor of the bottom mouseover div
var bgColor='#008000'
file://The bgColor to change to
var bgColorChangeTo='#00ff00'
file://The position the mouseover line div will stop at when going up!
var imageHeight=11
file://Object constructor
function makeNewsMenu(obj,nest){
 nest=(!nest) ? '':'document.'+nest+'.'
 this.css=(n) ?
eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')
this.scrollHeight=n?this.css.document.height:eval('document.all.'+obj+'.offs
etHeight')
 this.moveIt=b_moveIt;this.bgChange=b_bgChange;
 this.slideUp=b_slideUp; this.slideDown=b_slideDown;
 this.clipTo=b_clipTo;
    this.obj = obj + "Object";  eval(this.obj + "=this")
}
file://Objects methods
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x;
this.css.top=this.y}
function b_bgChange(color){if(ie) this.css.backgroundColor=color; else
this.css.bgColor=color}
function b_clipTo(t,r,b,l){
 if(n){this.css.clip.top=t; this.css.clip.right=r; this.css.clip.bottom=b;
this.css.clip.left=l
 }else this.css.clip="rect("+t+","+r+","+b+","+l+")";
}
function b_slideUp(ystop,moveby,speed,fn,wh){
 if(!this.slideactive){
  if(this.y>ystop){
   this.moveIt(this.x,this.y-5); eval(wh)
setTimeout(this.obj+".slideUp("+ystop+","+moveby+","+speed+",'"+fn+"','"+wh+
"')",speed)
  }else{
   this.slideactive=false; this.moveIt(0,ystop); eval(fn)
  }
 }
}
function b_slideDown(ystop,moveby,speed,fn,wh){
 if(!this.slideactive){
  if(this.y<ystop){
   this.moveIt(this.x,this.y+5); eval(wh)
setTimeout(this.obj+".slideDown("+ystop+","+moveby+","+speed+",'"+fn+"','"+w
h+"')",speed)
  }else{
   this.slideactive=false; this.moveIt(0,ystop); eval(fn)
  }
 }
}
file://Initiating the page, making cross-browser objects
function newsMenuInit(){
 oTopMenu=new Array()
 for(i=0;i<=numberOfMenus;i++){
  oTopMenu[i]=new Array()
  oTopMenu[i][0]=new makeNewsMenu('divTopMenu'+i)
  oTopMenu[i][1]=new makeNewsMenu('divTopMenuBottom'+i,'divTopMenu'+i)
  oTopMenu[i][2]=new makeNewsMenu('divTopMenuText'+i,'divTopMenu'+i)
  oTopMenu[i][1].moveIt(0,imageHeight)
  oTopMenu[i][0].clipTo(0,mwidth,imageHeight+3,0)
  oTopMenu[i][0].moveIt(i*mwidth+fromLeft+(i*pxBetween),fromTop)
  oTopMenu[i][0].css.visibility="visible"
 }
}
file://Moves the menu
function topMenu(num){
 if(oTopMenu[num][1].y==imageHeight)
oTopMenu[num][1].slideDown(oTopMenu[num][2].scrollHeight+20,10,40,'oTopMenu[
'+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)','oTopMenu['+num+'][
0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)')
 else if(oTopMenu[num][1].y==oTopMenu[num][2].scrollHeight+20)
oTopMenu[num][1].slideUp(imageHeight,10,40,'oTopMenu['+num+'][0].clipTo(0,mw
idth,oTopMenu['+num+'][1].y+3,0)','oTopMenu['+num+'][0].clipTo(0,mwidth,oTop
Menu['+num+'][1].y+3,0)')
}
file://Changes background onmouseover
function menuOver(num){oTopMenu[num][1].bgChange(bgColorChangeTo)}
function menuOut(num){oTopMenu[num][1].bgChange(bgColor)}
file://Calls the init function onload
onload=newsMenuInit;
</script>
<style type="text/css">A:link {
 TEXT-DECORATION: none
}
A:visited {
 TEXT-DECORATION: none
}
A:hover {
 TEXT-DECORATION: underline
}
</style>
<meta content="Microsoft FrontPage 3.0" name="GENERATOR">
</head>
<body bgColor="#000000" bgProperties="fixed" vLink="#00ff00" text="#00ff00">
<!------ Tabella che formatta la pagina  ------->
<div align="center"><center>
<table border="0" width="500">
  <tr>
    <td width="500"><div class="clTopMenu" id="divTopMenu0"><a
    href="
http://www.html.it/dynamic/menu/menu13.htm#
"
    onclick="topMenu(0); if(ie)this.blur(); return false"
onmouseout="menuOut(0)"
    onmouseover="menuOver(0)">
    <dd><img align="left" alt border="0" height="11"
src="menu13-file/mailing.gif" width="101"></a>
      <div class="clTopMenuText" id="divTopMenuText0"><p><font
color="#00FF00">Iscriviti alle
      due mailing list di HTML point: ogni giorno una GIF animata nella tua
mailbox e ogni
      settimana un Javascript commentato. Cosa aspetti? E' gratis! </p>
      </div><div class="clTopMenuBottom" id="divTopMenuBottom0"></div></dd>
    </div><div class="clTopMenu" id="divTopMenu1"><a
    href="
http://www.html.it/dynamic/menu/menu13.htm#
"
    onclick="topMenu(1); if(ie)this.blur(); return false"
onmouseout="menuOut(1)"
    onmouseover="menuOver(1)">
    <dd><img align="left" alt imageborder="0" border="0" height="11"
      src="menu13-file/javascript.gif" width="101"></a> <div
class="clTopMenuText"
      id="divTopMenuText1"><p><font color="#00FF00">La piu' grande raccolta
italiana di
      Javascript: oltre 330 esempi commentati con relativo codice ed esempio
pratico.<br>
      <font color="#00FF00"><a href="
http://www.html.it/jscript
"
target="_new">Clicca qui</a> </p>
      </div><div class="clTopMenuBottom" id="divTopMenuBottom1"></div></dd>
    </div><div class="clTopMenu" id="divTopMenu2"><a
    href="
http://www.html.it/dynamic/menu/menu13.htm#
"
    onclick="topMenu(2); if(ie)this.blur(); return false"
onmouseout="menuOut(2)"
    onmouseover="menuOver(2)">
    <dd></a><a href="
http://www.html.it/dynamic/menu/menu13.htm
"
      onclick="topMenu(2); if(ie)this.blur(); return false"
onmouseout="menuOut(2)"
      onmouseover="menuOver(2)"><img align="left" alt border="0" height="11"
      src="menu13-file/altro.gif" width="101"></a> <div
class="clTopMenuText"
      id="divTopMenuText2"><a href="
http://www.html.it/java
"
target="_new"><p><font
      color="#00FF00">Applet Java</a><br>
      </p>
      </div><div class="clTopMenuBottom" id="divTopMenuBottom2"></div></dd>
    </div></td>
  </tr>
</table>
</center></div>
</body>
</html>
grazie..............

 metterli in verticale e tenerne 1 solo aperto per volta in piů se un menu


Mi viene male solo a vedere tutto il codice che hai messo, purtroppo in
questi giorni ho poco tempo da dedicare all'ng... più in là ci darò
un'occhiata, a meno che nessun'altro ti risponda prima.
CIAO
---
the fly on the net
webmaster di "the devil inside"
http://members.tripod.com/netfly
e-mail:
net...@netbusiness.it