Simple Web Menu
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="ASYSTInvitations.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="
http://schemas.microsoft.com/intellisense/ie5">
<!--// CLIENT SCRIPT-->
<script language="vbscript">
''Popup shows the POPUP MENU
Function Popup(dvPopupMenu, tdMenu)
''First, hide all other POPUP MENUs
HidePopups()
''Reset the POPUP MENU's display attribute to show the POPUP MENU
document.all.item(dvPopupMenu).style.display = ""
End Function
''HidePopups hides all the POPUP MENUs
''in this case we only have one
Function HidePopups()
document.all.item("dvFile").style.display = "None"
End Function
</script>
</HEAD>
<!--// body margins must be zero-->
<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<form id="Form1" method="post" runat="server">
<!--// POPUP MENU-->
<!--// the DIV style must have POSITION absolute and a WIDTH and-->
<!--// set the DISPLAY to none to hide it initialy.-->
<!--// Use the onmouseleave event to hide the POPUP MENU if no menu item was selected.-->
<div id="dvFile" style="DISPLAY: none; WIDTH: 10%; POSITION: absolute" onmouseleave="Hidepopups()">
<table border="1">
<tr>
<td>New</td>
</tr>
<tr>
<td>Open</td>
</tr>
<tr>
<td>Save</td>
</tr>
<tr>
<td>Exit</td>
</tr>
</TR>
</table>
</div>
<!--// MENU and the rest of the page-->
<table border="1">
<tr>
<!--// Use the onclick event to call the Popup function.-->
<!--// Pass the TD id and the id of the POPUP MENU to display-->
<td id="mnuFile" onclick="Popup 'dvFile', 'mnuFile'">File</td>
</tr>
</table>
</form>
<!--// After rendering the page, place the menu popups in the correct locations-->
<!--// under the menus-->
<script language="vbscript">
document.all.item("dvFile").style.top = document.all.item("mnuFile").offsetTop + document.all.item("mnuFile").offsetHeight
document.all.item("dvFile").style.left = document.all.item("mnuFile").offsetLeft + 1
</script>
</body>
</HTML>