Purchase Advertising On AWT
 Upload & Sell Your Software
 Upload & Sell Your eBook
 Enter The AWT Control Panel  Contact Applied Web Tools
 Sell Your eBook @ The Book Store  Password Troubles? Click Here!
Knowledge Center
Want to write for Applied Web Tools? Send your Writer's Query to
Editor@AppliedWebTools.net for details.
HTML
Reference
&
Tutorial
CSS
Reference
&
Tutorial
DOM
Reference
&
Tutorial
JavaScript
Reference
&
Tutorial
50+ Programming Examples
Use HTML, CSS, DOM & JavaScript Together
Misc. Essays & Documents
You'll Find Just About Anything In Here
50+ Web Page Constructions
Learn the Art of Using HTML, CSS, DOM & JavaScript Together
 Changing Background Colors
 Event Triggering With onLoad
 Disabling The Right Click
 DOM Driven Color Changing
 Switching Images
 innerHTML Attribute Access
 Change With innerHTML
 Changing Positions
 Change Position With onMouseMove
 Change Text Position
 Interactivity Skills
 Type-writing A Message
 Auto-changing Text Size
 Making Text Scroll
 Blinking Text
 Simple Form Authentication
 Change Background Color Of An INPUT
 Change Text Color Of An INPUT
 Change Background Image Of An INPUT
 Select All Checkboxes
 Select Color Of The Submit Button
 Change Text Color Of A Submit Button
 Insert Background Image To A Button
 Change Color Of Drop Down List
 Change Text Color Of A Drop Down List
 Change Color Of A TEXTAREA
 Change The Text Color Of A TEXTAREA
 Insert An Image Into A TEXTAREA
 Change The Size Of An Image
 Change The Source Of An Image
 Change The Position Of An Image
 Change The Background Image
 Moving Images Around The Page
 Drag & Drop An Image
 A Simple Image Viewer
 A Shaking Image
 A Digital Clock
 Drop Down List Link
 Top Drop Down Menu
 Always On Top Menu
 Inset Border Buttons
 A Description Generating Menu
 An Image Generating Menu
 A Horizontal Sliding Menu
 A Click Horizontal Sliding Menu
 Returning Cursor Co-ordinates
 Making Text Follow The Cursor
 Attaching An Image To The Cursor
Click-driven sliding horizontal menu

So you’ve all seen the horizontal menu that zoom out when you mouse over them, but it is entirely possible to change this if you find that it just isn’t what you’re looking for. You can initiate the menu with a click of the mouse (an onClick event handler) and slide it back with an onMouseOut event that collapses the menu. If you’d like to have the menu slide out when the button goes down and slide back when it goes up, uise the onMouseDown and onMouseUp event handlers.

Any CSS rule can be applied and any HTML tag can be used within the menu. You can even put a form on it if you so choose. Definitely add some images, small or large, to add some appeal.

We use the getElementById() method to access the properties of the page elements and act upon them. A single onClick event handler executes the JavaScript functions within the HEAD of the document and the menu slides out.

<html>
<head>

<style>
body{
font-family:arial;
}

a {
color:black;text-decoration:none;font:bold;
}

a:hover {
color:#606060;
}

td.menu {
background:lightblue;
}

table.nav {
background:black;
position:relative;
font: bold 80% arial;
top:0px;
left:-135px;
margin-left:3px;
}
</style>

<script type="text/javascript">
var i=-135;
var c=0;
var intHide;
var speed=3;
function show_hide_menu() {
if (c==0)
{
c=1;
clearInterval(intHide);
intShow=setInterval("show()",10);
} else {
c=0;
clearInterval(intShow);
intHide=setInterval("hide()",10);
}
}

function show() {
if (i<-12)
{
i=i+speed;
document.getElementById('myMenu').style.left=i;
}
}

function hide() {
if (i>-135)
{
i=i-speed;
document.getElementById('myMenu').style.left=i;
}
}
</script>

</head>

<body>

<table id="myMenu" class="nav" width="150" onclick="show_hide_menu()">
<tr>
<td class="menu"><a href="page.html">Item One</a></td>
</tr><tr>
<td class="menu"><a href="page.html">Item Two</a></td>
</tr><tr>
<td class="menu"><a href="page.html">Item Three</a></td>
</tr><tr>
<td class="menu"><a href="page.html">Item Four</a></td>
</tr><tr>
<td class="menu"><a href="page.html">Item Five</a></td>
</tr>
</table>

</body>
</html>


There can be as many menu items as you wish, and they don’t have to be in one single column as I have them here. Multi-column menus are entirely possible – if it can be rendered in a normal page you can include it in your menu.
I do not employ cookies or tracking devices of any kind