Ver Mensaje Individual
  #3 (permalink)  
Antiguo 24/01/2008, 12:09
satur86
 
Fecha de Ingreso: noviembre-2006
Mensajes: 27
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: Hacer fijo un menú en javascript

Básicamente viene a ser lo siguiente. El código es mucho más largo pero para abreviarlo pongo la parte en la que manipulan las variables que he comentado antes. No se como hacer para que esté en función de la celda y no en función de las ventanas.

oSlideMenu.moveIt(menux,menu..y)
.....
.....
.....

<script>

//Variables to set
between=28 //The pixel between the menus and the submenus
mainheight=35 //The height of the mainmenus
subheight=22 //The height of the submenus
pxspeed=8 //The pixel speed of the animation
timspeed=15 //The timer speed of the animation
menuy=340 //The top placement of the menu.
menux=280 //The left placement of the menu
//Images - Play with these
level0_regular="level0_regular.gif"
level0_round="level0_round.gif"
level1_regular="level1_regular.gif"
level1_round="level1_round.gif"
level1_sub="level1_sub.gif"
level1_sub_round="level1_sub_round.gif"
level1_round2="level1_round2.gif"
level2_regular="level2_regular.gif"
level2_round="level2_round.gif"

//Leave this line
preLoadBackgrounds(level0_regular,level0_round,lev el1_regular,level1_round,level1_sub,level1_sub_rou nd,level1_round2,level2_regular,level2_round)


//There are 3 different types of menus you can make
//top = Main menus
//sub = Sub menus
//sub2 = SubSub menus

//You control the look of the menus in the stylesheet

//makeMenu('TYPE','TEXT','LINK','TARGET', 'END (THE LAST MENU)')

//Menu 2
<?php if ($_SESSION[user]=='admin'){?>
makeMenu('top','Herramientas de Administrador')
makeMenu('sub','Noticias')
makeMenu('sub2','Añadir noticia','anoticia.php')
makeMenu('sub','Eventos')
<?}

//Menu 3
if ($_SESSION[user]!=NULL){?>

makeMenu('top','Mensajes','index.php?categoria=men sajes')
<?}?>


//Starting the menu
onload=SlideMenuInit;
</script>

</body>
</html>

Gracias !!

(Si quito la primera linea, el menú se coloca arriba a la izquierda, pero no entiendo por qué...en el index.html he colocado el include de menu/fire.php dentro de una celda...)

<td width="200px">
<!--Menu-->
<?include('menu/fire.php');?>

</td>