Move Menu

SimplytheBest.net
Blogs
DHTML scripts
Free fonts archive
Friends
Music directory
Software
Free sounds
Web search
 
DHTML script
 

SimplytheBest
Scripts

ASP scripts
PERL scripts
PHP scripts
JavaScripts & Ajax
Snippets
Online scripts

Ajax, DHTML
& JavaScripts

Animation
Background
Bookmarks
Buttons
Calculators
Cookies
Data handling
E-mail
Enhancements
Forms
Image rotation
Menus
Messages
Miscellaneous
Music
Password protection
Redirection
Scrollers
Tables
Time & date
Windows

Publishers
Add script
Account login
Publisher list



 

Home > Scripts > DHTML scripts & JavaScripts > Menus > Floating menu script

 

Floating menu script

AUTHOR: Randy Bennett
TYPE: Freeware
BROWSERS:
IE 4+, IE 5+, IE 6+, NS 4+

With this script you can create a floating navigation menu. You can position the menu anywhere on the page with the click of a mouse.


EXAMPLE

Click on "Move Menu" to pick up the menu on the top-left-corner and double click to drop it.


1)
Insert this script in the <HEAD> section of the page.

then copy (CTRL-C) & paste (CTRL-V)

2) Insert the following HTML code anywhere in the <BODY> section of the page.

then copy (CTRL-C) & paste (CTRL-V)

3) Insert the OnLoad event handler inside the <BODY> tag as follows:

<body OnLoad="checkVersion4()", followed by other tags such as bgcolor, etc..

copy (CTRL-C) & paste (CTRL-V)

4) Change these variables to customize the style of the popup menu and the links in this section of the HTML code:

<!-- Start Floating Menu -->
<div id="object1" style="position:absolute; visibility:show; left:50px; top:50px; z-index:2">
<table border="1" cellpadding="2" bgcolor="#CCCC00" cellspacing="0">
<tr>
<td bgcolor=EEEEEE>
<p align="center"><a href="javascript:void(0)" onmousedown="setObject(1)">
<font face="Arial" size="2"><b>Movable Menu</b></font></a></p>
</td></tr>
<tr><td>
<font face="Verdana" size="2">
<a href="http://simplythebest.net">SimplytheBest.net</a><br>
<a href="shareware.html">Shareware</a><br>
<a href="dhtml_scripts.html">DHTML scripts</a><br>
<a href="cgi_scripts.html">Perl CGI scripts</a><br>
</font>
</td></tr></table></div>
<div id="object11" style="position:absolute; visibility:show; left:-70px; top:-70px; z-index:2"></div>

<!-- End Floating Menu -->

5) Define the starting position of the menu in this section of the script:

xpos1=50; // the left pixel value
ypos1=50;
// the top pixel value

And in this section of the HTML code:

<!-- Start Floating Menu -->
<div id="object1" style="position:absolute; visibility:show; left:50px; top:50px; z-index:2">


[BACK] [TOP]

 


Copyright © 1997-2009 SimplytheBest Inc. Terms of Use and Legal Disclaimer.
All copyrights are acknowledged. All rights reserved.