How to make a menu component?

  • Thread starter Luis Esteban Valencia
  • Start date
L

Luis Esteban Valencia

I need to make a menu componen like this page www.f135.com
They made the menu on Javascript and I already have the code to make that
menu in javascript, but I want to make a menu so that the user can make any
nodes and subnodes.

This is the code in javascript, I want to put it in asp.net control

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
..menuOff {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
color: #0099FF;
}
body {
background-color: #333333;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
}
-->
</style>
<script language="javascript">

var menuDivContent = new Array();
menuDivContent['0'] = "<tr><td>Content of <b>Zero</b></td><td>Content of
<b>Zero</b></td><td>Content of <b>Zero</b></td>";
menuDivContent['1'] = "Content of <b>ONE</b>";
menuDivContent['2'] = "Content of <b>TWO</b>";
menuDivContent['3'] = "Content of <b>Three</b>";
menuDivContent['4'] = "Content of <b>Four</b>";

function ChangeOut(TDthis, DivContent){
TDthis.style.backgroundColor = "#FFFFFF";
document.getElementById('menuDiv').innerHTML =
menuDivContent[DivContent];

}
function ChangeBack(TDthis, DivContent){
TDthis.style.backgroundColor = "#333333";
}

</script>
</head>
<body style="background-color: #FFFFFF">
<table width="600" border="1" cellspacing="0" cellpadding="0"
bordercolor="#000000" bordercolorlight="#FFFFFF" bordercolordark="#000000">
<tr align="center" valign="middle" class="menuOff">
<td onMouseOver="ChangeOut(this, 0);" onMouseOut="ChangeBack(this);"
height="14">Menu P1 </td>
<td onMouseOver="ChangeOut(this, 1);" onMouseOut="ChangeBack(this);"
height="14">Menu P2 </td>
<td onMouseOver="ChangeOut(this, 2);" onMouseOut="ChangeBack(this);"
height="14">Menu P3 </td>
<td onMouseOver="ChangeOut(this, 3);" onMouseOut="ChangeBack(this);"
height="14">Menu P4 </td>
<td onMouseOver="ChangeOut(this, 4);" onMouseOut="ChangeBack(this);"
height="14">Menu P5 </td>
</tr>
<tr>
<td colspan="5"><div id="menuDiv" ></div></td>
</tr>
</table>

</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top