Sos con este menu
Hola quiero utilizar este menu en mi web pero el problema que encuentro para mi proposito es que quisiera poner submenu tipo arbol (expandir) en cuenta de ir a un sitio directamente, unos serán directos y otros a traves de el submenu abierto al pinchar sobre el link principal.
Mando el script a ver si puedes ayudarme puesto que yo no lo consigo.
<SCRIPT LANGUAGE="JavaScript1.2">
function move(x) {
if (document.all) {
object1.style.pixelLeft += x;
object1.style.visibility = "visible"}
else if (document.layers) {
document.object1.left += x;
document.object1.visibility = "show"}};
function makeStatic() {
if (document.all) {object1.style.pixelTop=document.body.scrollTop+20}
else {eval(document.object1.top=eval(window.pageYOffset+20));}
setTimeout("makeStatic()",0);}
</SCRIPT> <STYLE>
<!--
.hl {
Background-Color : yellow;
Cursor:hand;
}
.n {
Cursor:hand;
}
-->
</STYLE><html>
<head>
<!-- Dentro de HEAD -->
</head>
<body>
<!-- Dentro de BODY -->
<LAYER VISIBILITY="hide" TOP="20" NAME="object1" BGCOLOR="black" LEFT="0" ONMOUSEOVER="move(132)" ONMOUSEOUT="move(-132)">
<SCRIPT LANGUAGE="JavaScript1.2">
function positionmenu(){
move(-132)
}
if (document.all) {document.write('<DIV ID="object1" style="visibility:hidden;cursor:hand; Position : Absolute ;Left : 0px ;Top : 20px ;Z-Index : 20" onmouseover="move(132)" onmouseout="move(-132)">')}
</SCRIPT> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1" WIDTH="150" BGCOLOR="#000000">
<TR> <TD BGCOLOR="#0099FF"> <FONT SIZE="4" FACE="Arial"><B>Menu</B></FONT></TD><SCRIPT LANGUAGE="JavaScript1.2">
document.write('<td align="center" rowspan="100" width="16" bgcolor="#FF6666"><span style="font-size:13px"><p align="center"><font face="Arial Black">S<br>I<br>D<br>E<br>M<br>E<br>N<BR>U</font></p></span></TD>')
</SCRIPT> </TR> <SCRIPT LANGUAGE="JavaScript1.2"><!--
if (document.all||document.layers) {
makeStatic();}
var text=new Array();
var thelink=new Array();
text[0]="Hola";
text[1]="Que";
text[2]="tal";
text[3]="estas";
text[4]="ayuda";
text[5]="con este";
text[6]="script";
text[7]="Gracias";
thelink[0]="http://";
thelink[1]="http://";
thelink[2]="http://";
thelink[3]="http://";
thelink[4]="http://";
thelink[5]="http://";
thelink[6]="http://";
thelink[7]="http://";
//enter target of above links
//Valid values are '', 'new', or 'framename' (where 'framename' is the name of the frame you wish the links to target)
var linktarget=''
///DO NOT EDIT BELOW THIS LINE////////////////
function navigateie(which){
if (linktarget=='')
window.location=thelink[which]
else if (linktarget=='new')
window.open(thelink[which])
else{
temp_var=eval("window.parent."+linktarget)
temp_var.location=thelink[which]
}
}
for (i=0;i<=text.length-1;i++)
if (document.all) {document.write('<TR><TD height=20 bgcolor=white onclick="navigateie('+i+')" onmouseover="className=\'hl\'" onmouseout="className=\'n\'"><FONT SIZE=2 FACE=ARIAL> '+text+'</FONT></TD></TR>')}
else {document.write('<TR><TD bgcolor="white"><ILAYER><LAYER HEIGHT="18" onmouseover="this.bgColor=\'yellow\'" onmouseout="this.bgColor=\'white\'" width=131><FONT SIZE=2 FACE=ARIAL> <A HREF="'+thelink+'" target="'+linktarget+'" id="nounderline">'+text+'</A></FONT></LAYER></ILAYER></TD></TR>')}
//-->
</SCRIPT> <TR> <TD BGCOLOR="#0099FF"></TD></TR> </TABLE><SCRIPT LANGUAGE="JavaScript1.2">
if (document.all) {document.write('</DIV>')}
window.onload=positionmenu
</SCRIPT> </LAYER>
</body>
</html>
Mando el script a ver si puedes ayudarme puesto que yo no lo consigo.
<SCRIPT LANGUAGE="JavaScript1.2">
function move(x) {
if (document.all) {
object1.style.pixelLeft += x;
object1.style.visibility = "visible"}
else if (document.layers) {
document.object1.left += x;
document.object1.visibility = "show"}};
function makeStatic() {
if (document.all) {object1.style.pixelTop=document.body.scrollTop+20}
else {eval(document.object1.top=eval(window.pageYOffset+20));}
setTimeout("makeStatic()",0);}
</SCRIPT> <STYLE>
<!--
.hl {
Background-Color : yellow;
Cursor:hand;
}
.n {
Cursor:hand;
}
-->
</STYLE><html>
<head>
<!-- Dentro de HEAD -->
</head>
<body>
<!-- Dentro de BODY -->
<LAYER VISIBILITY="hide" TOP="20" NAME="object1" BGCOLOR="black" LEFT="0" ONMOUSEOVER="move(132)" ONMOUSEOUT="move(-132)">
<SCRIPT LANGUAGE="JavaScript1.2">
function positionmenu(){
move(-132)
}
if (document.all) {document.write('<DIV ID="object1" style="visibility:hidden;cursor:hand; Position : Absolute ;Left : 0px ;Top : 20px ;Z-Index : 20" onmouseover="move(132)" onmouseout="move(-132)">')}
</SCRIPT> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1" WIDTH="150" BGCOLOR="#000000">
<TR> <TD BGCOLOR="#0099FF"> <FONT SIZE="4" FACE="Arial"><B>Menu</B></FONT></TD><SCRIPT LANGUAGE="JavaScript1.2">
document.write('<td align="center" rowspan="100" width="16" bgcolor="#FF6666"><span style="font-size:13px"><p align="center"><font face="Arial Black">S<br>I<br>D<br>E<br>M<br>E<br>N<BR>U</font></p></span></TD>')
</SCRIPT> </TR> <SCRIPT LANGUAGE="JavaScript1.2"><!--
if (document.all||document.layers) {
makeStatic();}
var text=new Array();
var thelink=new Array();
text[0]="Hola";
text[1]="Que";
text[2]="tal";
text[3]="estas";
text[4]="ayuda";
text[5]="con este";
text[6]="script";
text[7]="Gracias";
thelink[0]="http://";
thelink[1]="http://";
thelink[2]="http://";
thelink[3]="http://";
thelink[4]="http://";
thelink[5]="http://";
thelink[6]="http://";
thelink[7]="http://";
//enter target of above links
//Valid values are '', 'new', or 'framename' (where 'framename' is the name of the frame you wish the links to target)
var linktarget=''
///DO NOT EDIT BELOW THIS LINE////////////////
function navigateie(which){
if (linktarget=='')
window.location=thelink[which]
else if (linktarget=='new')
window.open(thelink[which])
else{
temp_var=eval("window.parent."+linktarget)
temp_var.location=thelink[which]
}
}
for (i=0;i<=text.length-1;i++)
if (document.all) {document.write('<TR><TD height=20 bgcolor=white onclick="navigateie('+i+')" onmouseover="className=\'hl\'" onmouseout="className=\'n\'"><FONT SIZE=2 FACE=ARIAL> '+text+'</FONT></TD></TR>')}
else {document.write('<TR><TD bgcolor="white"><ILAYER><LAYER HEIGHT="18" onmouseover="this.bgColor=\'yellow\'" onmouseout="this.bgColor=\'white\'" width=131><FONT SIZE=2 FACE=ARIAL> <A HREF="'+thelink+'" target="'+linktarget+'" id="nounderline">'+text+'</A></FONT></LAYER></ILAYER></TD></TR>')}
//-->
</SCRIPT> <TR> <TD BGCOLOR="#0099FF"></TD></TR> </TABLE><SCRIPT LANGUAGE="JavaScript1.2">
if (document.all) {document.write('</DIV>')}
window.onload=positionmenu
</SCRIPT> </LAYER>
</body>
</html>
1 respuesta
Respuesta de gandalf26
1