Foros del Web » Programando para Internet » Javascript »

Problema con barra de menú JS

Estas en el tema de Problema con barra de menú JS en el foro de Javascript en Foros del Web. Hola a todos Estoy utilizando una barra de menu, horizontal y centrada ubicada en mi pagina web a 102 px del borde superior. El código ...
  #1 (permalink)  
Antiguo 25/08/2004, 23:57
 
Fecha de Ingreso: junio-2004
Ubicación: San Salvador de Jujuy - Jujuy - Argentina
Mensajes: 43
Antigüedad: 19 años, 10 meses
Puntos: 0
Problema con barra de menú JS

Hola a todos

Estoy utilizando una barra de menu, horizontal y centrada ubicada en mi pagina web a 102 px del borde superior. El código de la barra de menú está compuesto por dos archivos js que lo adapte de la siguiente dirección:

http://javascript.internet.com/navig...nu.html#source

La parte variable del código es:

var NoOffFirstLineMenus=5; // Number of first level items
var LowBgColor='#3D3D3D'; // Background color when mouse is not over
var LowSubBgColor='#3D3D3D'; // Background color when mouse is not over on subs
var HighBgColor='#2A2A2A'; // Background color when mouse is over
var HighSubBgColor='#2A2A2A'; // Background color when mouse is over on subs
var FontLowColor='#C2C2C2'; // Font color when mouse is not over
var FontSubLowColor='#C2C2C2'; // Font color subs when mouse is not over
var FontHighColor='#FFFFC6'; // Font color when mouse is over
var FontSubHighColor='#FFFFC6'; // Font color subs when mouse is over
var BorderColor='#7F7F7F'; // Border color
var BorderSubColor='#7F7F7F'; // Border color for subs
var BorderWidth=2; // Border width
var BorderBtwnElmnts=1; // Border between elements 1 or 0
var FontFamily="verdana,arial,times" // Font family menu items
var FontSize=8; // Font size menu items
var FontBold=1; // Bold menu items 1 or 0
var FontItalic=0; // Italic menu items 1 or 0
var MenuTextCentered='left'; // Item text position 'left', 'center' or 'right'
var MenuCentered='center'; // Menu horizontal position 'left', 'center' or 'right'
var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle', 'bottom' or static
var ChildOverlap=.01; // horizontal overlap child/ parent
var ChildVerticalOverlap=.3; // vertical overlap child/ parent
var StartTop=102; // Menu offset x coordinate
var StartLeft=0; // Menu offset y coordinate
var VerCorrect=0; // Multiple frames y correction
var HorCorrect=0; // Multiple frames x correction
var LeftPaddng=5; // Left padding
var TopPaddng=2; // Top padding
var FirstLineHorizontal=1; // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
var MenuFramesVertical=0; // Frames in cols or rows 1 or 0
var DissapearDelay=1000; // delay before menu folds in
var TakeOverBgColor=1; // Menu frame takes over background color subitem frame
var FirstLineFrame='navig'; // Frame where first level appears
var SecLineFrame='space'; // Frame where sub levels appear
var DocTargetFrame='space'; // Frame where target documents appear
var TargetLoc='span'; // span id for relative positioning
var HideTop=0; // Hide first level when loading new document 1 or 0
var MenuWrap=0; // enables/ disables menu wrap 1 or 0
var RightToLeft=0; // enables/ disables right to left unfold 1 or 0
var UnfoldsOnClick=0; // Level 1 unfolds onclick/ onmouseover
var WebMasterCheck=1; // menu tree checking on or off 1 or 0
var ShowArrow=1; // Uses arrow gifs when 1
var KeepHilite=1; // Keep selected path highlighted
var Arrws=['http://www.misitio.com/tri.gif',8,8,'http://www.misitio.com/tridown.gif',8,4,'http://www.misitio.com/trileft.gif',4,8]; // Arrow source, width and height

function BeforeStart(){return}
function AfterBuild(){return}
function BeforeFirstOpen(){return}
function AfterCloseAll(){return}

// Menu tree
// MenuX=new Array(Text to show, Link, background image (optional), number of sub elements, height, width);
// For rollover images set "Text to show" to: "rollover:Image1.jpg:Image2.jpg"

Menu1=new Array("","http://www.misitio.com/index.htm","",0,16,145);
Menu2= . . .
. . .

Los problemas que tengo son:
1) Cuando visualizo mi página desde el cache de google, la barra de menu se localiza sobre la caja del cache, no desplazandose junto con la página, supongo porque el valor que toma la variable, var StartTop=102, es absoluta. Cómo la convierto en relativa o bien cómo soluciono el problema? .
2) En algunas pc, no en la mía, la barra de menu se queda fija a 102 px del borde cuando se avanza la página con la barra de desplazamiento. Por qué?

Si alguien puede darme una mano... gracias de antemano!!
Salu2
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:50.