Ayuda con menu
Hola q tal?
Veras mi problema es el siguiente: tengo una página con dos frames y en el superior he colocado un menú con el siguiente código:
<script language="JavaScript">
var myNavBar1 = new NavBar(0);
var dhtmlMenu;
//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub category width in pixels)
//add more menus simply by adding more "blocks" of same code below
dhtmlMenu = new NavBarMenu(100, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Inicio", "index.htm"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Depósito", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Caducar página", "caducar.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Pantalla completa", "ventanafull.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Anular botones", "mouse.htm"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(110, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Tutoriales", ""));
dhtmlMenu.addItem(new NavBarMenuItem("La Variable", "http://www.lavariable.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Programación", "http://www.programacion.net"));
dhtmlMenu.addItem(new NavBarMenuItem("ABC Datos", "http://www.abcdatos.com/"));
dhtmlMenu.addItem(new NavBarMenuItem("Cybercursos", "http://www.cybercursos.net/"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("Buscadores", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Yahoo", "http://www.yahoo.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Alta Vista", "http://www.altavista.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Infoseek", "http://www.infoseek.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Excite", "http://www.excite.com"));
dhtmlMenu.addItem(new NavBarMenuItem("HotBot", "http://www.hotbot.com"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("Webmasters", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Foros del Web", "http://www.forosdelweb.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Desarrollo Web", "http://www.desarrolloweb.com"));
dhtmlMenu.addItem(new NavBarMenuItem("JavaScript", "http://javascript.internet.com"));
dhtmlMenu.addItem(new NavBarMenuItem("BrainJar", "http://brainjar.com"));
myNavBar1.addMenu(dhtmlMenu);
//set menu colors
myNavBar1.setColors("#ffffff","#ffffff","#000000","#ffffff","#6B6B6B","#000000","#C0C0C0","#ffffff","#8A0000")
myNavBar1.setFonts("Arial","plain","bold","11px","Arial","plain","bold","11px");
//uncomment below line to center the menu (valid values are "left", "center", and "right"
//myNavBar1.setAlign("center")
var fullWidth;
function init() {
// Get width of window, need to account for scrollbar width in Netscape.
fullWidth = getWindowWidth()
- (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);
myNavBar1.resize(fullWidth);
myNavBar1.create();
myNavBar1.setzIndex(2);
}
</script>
necesito que los enlaces se me abran en el frame que yo quiera. El menu esta copiado del programa scriptmaster. Ya lo tengo configurado a mi gusto (colores, enlaces) pero no consigo hacer que se me abra en el frame que yo quiera.
Tambien lleva un archivo de comandos Jscript que es el siguiente:
var isMinNS4=(navigator.appName.indexOf("Netscape")>=0&&parseFloat(navigator.appVersion)>=4)?1:0;var isMinIE4=(document.all)?1:0;var isMinIE5=(isMinIE4&&navigator.appVersion.indexOf("5.")>=0)?1:0;function hideLayer(layer){if(isMinNS4)layer.visibility="hide";if(isMinIE4)layer.style.visibility="hidden";}function showLayer(layer){if(isMinNS4)layer.visibility="show";if(isMinIE4)layer.style.visibility="visible";}function inheritLayer(layer){if(isMinNS4)layer.visibility="inherit";if(isMinIE4)layer.style.visibility="inherit";}function getVisibility(layer){if(isMinNS4){if(layer.visibility=="show")return "visible";if(layer.visibility=="hide")return "hidden";return layer.visibility;}if(isMinIE4)return layer.style.visibility;return "";}function moveLayerTo(layer,x,y){if(isMinNS4)layer.moveTo(x,y);if(isMinIE4){layer.style.left=x;layer.style.top=y;}}function moveLayerBy(layer,dx,dy){if(isMinNS4)layer.moveBy(dx,dy);if(isMinIE4){layer.style.pixelLeft+=dx;layer.style.pixelTop+=dy;}}function getLeft(layer){if(isMinNS4)return layer.left;if(isMinIE4)return layer.style.pixelLeft;return-1;}function getTop(layer){if(isMinNS4)return layer.top;if(isMinIE4)return layer.style.pixelTop;return-1;}function getRight(layer){if(isMinNS4)return layer.left+getWidth(layer);if(isMinIE4)return layer.style.pixelLeft+getWidth(layer);return-1;}function getBottom(layer){if(isMinNS4)return layer.top+getHeight(layer);if(isMinIE4)return layer.style.pixelTop+getHeight(layer);return-1;}function getPageLeft(layer){var x;if(isMinNS4)return layer.pageX;if(isMinIE4){x=0;while(layer.offsetParent!=null){x+=layer.offsetLeft;layer=layer.offsetParent;}x+=layer.offsetLeft;return x;}return-1;}function getPageTop(layer){var y;if(isMinNS4)return layer.pageY;if(isMinIE4){y=0;while(layer.offsetParent!=null){y+=layer.offsetTop;layer=layer.offsetParent;}y+=layer.offsetTop;return y;}return-1;}function getWidth(layer){if(isMinNS4){if(layer.document.width)return layer.document.width;else return layer.clip.right-layer.clip.left;}if(isMinIE4){if(layer.style.pixelWidth)return layer.style.pixelWidth;else return layer.clientWidth;}return-1;}function...
Veras mi problema es el siguiente: tengo una página con dos frames y en el superior he colocado un menú con el siguiente código:
<script language="JavaScript">
var myNavBar1 = new NavBar(0);
var dhtmlMenu;
//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub category width in pixels)
//add more menus simply by adding more "blocks" of same code below
dhtmlMenu = new NavBarMenu(100, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Inicio", "index.htm"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Depósito", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Caducar página", "caducar.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Pantalla completa", "ventanafull.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Anular botones", "mouse.htm"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(110, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Tutoriales", ""));
dhtmlMenu.addItem(new NavBarMenuItem("La Variable", "http://www.lavariable.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Programación", "http://www.programacion.net"));
dhtmlMenu.addItem(new NavBarMenuItem("ABC Datos", "http://www.abcdatos.com/"));
dhtmlMenu.addItem(new NavBarMenuItem("Cybercursos", "http://www.cybercursos.net/"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("Buscadores", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Yahoo", "http://www.yahoo.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Alta Vista", "http://www.altavista.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Infoseek", "http://www.infoseek.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Excite", "http://www.excite.com"));
dhtmlMenu.addItem(new NavBarMenuItem("HotBot", "http://www.hotbot.com"));
myNavBar1.addMenu(dhtmlMenu);
dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("Webmasters", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Foros del Web", "http://www.forosdelweb.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Desarrollo Web", "http://www.desarrolloweb.com"));
dhtmlMenu.addItem(new NavBarMenuItem("JavaScript", "http://javascript.internet.com"));
dhtmlMenu.addItem(new NavBarMenuItem("BrainJar", "http://brainjar.com"));
myNavBar1.addMenu(dhtmlMenu);
//set menu colors
myNavBar1.setColors("#ffffff","#ffffff","#000000","#ffffff","#6B6B6B","#000000","#C0C0C0","#ffffff","#8A0000")
myNavBar1.setFonts("Arial","plain","bold","11px","Arial","plain","bold","11px");
//uncomment below line to center the menu (valid values are "left", "center", and "right"
//myNavBar1.setAlign("center")
var fullWidth;
function init() {
// Get width of window, need to account for scrollbar width in Netscape.
fullWidth = getWindowWidth()
- (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);
myNavBar1.resize(fullWidth);
myNavBar1.create();
myNavBar1.setzIndex(2);
}
</script>
necesito que los enlaces se me abran en el frame que yo quiera. El menu esta copiado del programa scriptmaster. Ya lo tengo configurado a mi gusto (colores, enlaces) pero no consigo hacer que se me abra en el frame que yo quiera.
Tambien lleva un archivo de comandos Jscript que es el siguiente:
var isMinNS4=(navigator.appName.indexOf("Netscape")>=0&&parseFloat(navigator.appVersion)>=4)?1:0;var isMinIE4=(document.all)?1:0;var isMinIE5=(isMinIE4&&navigator.appVersion.indexOf("5.")>=0)?1:0;function hideLayer(layer){if(isMinNS4)layer.visibility="hide";if(isMinIE4)layer.style.visibility="hidden";}function showLayer(layer){if(isMinNS4)layer.visibility="show";if(isMinIE4)layer.style.visibility="visible";}function inheritLayer(layer){if(isMinNS4)layer.visibility="inherit";if(isMinIE4)layer.style.visibility="inherit";}function getVisibility(layer){if(isMinNS4){if(layer.visibility=="show")return "visible";if(layer.visibility=="hide")return "hidden";return layer.visibility;}if(isMinIE4)return layer.style.visibility;return "";}function moveLayerTo(layer,x,y){if(isMinNS4)layer.moveTo(x,y);if(isMinIE4){layer.style.left=x;layer.style.top=y;}}function moveLayerBy(layer,dx,dy){if(isMinNS4)layer.moveBy(dx,dy);if(isMinIE4){layer.style.pixelLeft+=dx;layer.style.pixelTop+=dy;}}function getLeft(layer){if(isMinNS4)return layer.left;if(isMinIE4)return layer.style.pixelLeft;return-1;}function getTop(layer){if(isMinNS4)return layer.top;if(isMinIE4)return layer.style.pixelTop;return-1;}function getRight(layer){if(isMinNS4)return layer.left+getWidth(layer);if(isMinIE4)return layer.style.pixelLeft+getWidth(layer);return-1;}function getBottom(layer){if(isMinNS4)return layer.top+getHeight(layer);if(isMinIE4)return layer.style.pixelTop+getHeight(layer);return-1;}function getPageLeft(layer){var x;if(isMinNS4)return layer.pageX;if(isMinIE4){x=0;while(layer.offsetParent!=null){x+=layer.offsetLeft;layer=layer.offsetParent;}x+=layer.offsetLeft;return x;}return-1;}function getPageTop(layer){var y;if(isMinNS4)return layer.pageY;if(isMinIE4){y=0;while(layer.offsetParent!=null){y+=layer.offsetTop;layer=layer.offsetParent;}y+=layer.offsetTop;return y;}return-1;}function getWidth(layer){if(isMinNS4){if(layer.document.width)return layer.document.width;else return layer.clip.right-layer.clip.left;}if(isMinIE4){if(layer.style.pixelWidth)return layer.style.pixelWidth;else return layer.clientWidth;}return-1;}function...
1 respuesta
Respuesta de gandalf26
1