Click here to close
SimplytheBest DHTML Scripts
A collection of the best DHTML scripts and Javascripts available on the Web.
SimplytheBest Device Drivers
The drivers library offers you links to where you can find the drivers you need.
SimplytheBest Shareware
A shareware directory with the best shareware and freeware available on the Web.

DHTML scripts

DHTML scripts DHTML script
 

DHTML script
categories

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

 

Home > Scripts > DHTML scripts & JavaScripts > Menus > Slide-in table script

 

Slide-in table script

AUTHOR: Submitted by Jasmine
TYPE: Freeware
BROWSERS:
IE 4+, IE 5+, IE 6+, NS 4+

With this script you can display menus or large amounts of information when needed. Insert text, links, graphics and any other HTML element you wish to include.


EXAMPLE

Click on the tab image to Hide or Show the slide-in table.


1)
Insert this Style command with the 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=init(), followed by other tags such as bgcolor, etc..

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

4) Change these variables to customize the style of the slide-in menu and its positioning on the page in this section of the <STYLE> command:

<style>
// for the tab image
#tabdiv { z-index: 2; left: 220px; position: absolute; top: 210px
}
// for the popout window
#textdiv { z-index: 1; padding-top: 10px; position: absolute; top: 200px
border-top-width: 1px; padding-right: 5px; padding-left: 5px
border-left-width: 1px; border-left-color: #000099; left: 0px
border-bottom-width: 1px; border-bottom-color: #000099
padding-bottom: 10px; width: 220px; color: black; border-top-color: #000099
background-color: #eeeeff; border-right-width: 1px; border-right-color: #000099
}
</style>

5) Define the left positioning of the tab image also in this section of the script:

if (n) {
tab.visibility = "hide";
tab.left = 220;
tab.visibility = "show";
poptext.visibility = "show";
tabShow = 1;
}
if (ie) {
tab.visibility = "hidden";
tab.left = 220;

6) Define the the path to the tab image and the content of the slide-in menu in this section of the HTML code:

<DIV id=tabDiv><a href="javascript:hidepoptext();"><img alt="Click here to close" src="images/popout_menu.gif" width=14 border=0></a></DIV>
<DIV id=textdiv>
<font face="Verdana" size="2"><a href="http://simplythebest.net/scripts/dhtml_scripts.html">
SimplytheBest DHTML Scripts & Javascripts</a></font><br>
<font face="Verdana" size="1">A collection of the best DHTML scripts and javascripts available on the Web.<br></font>

</DIV>

To add a second popup window to the page, insert a new set of styles for the tab and the popup window, and the corresponding new DIV containers. For example:

// in the style section add:
#tabdiv2 { z-index: 2; left: 220px; position: absolute; top: 350px
}
#textdiv2 { z-index: 1; padding-top: 10px; position: absolute; top: 340px;
etc..

In the <BODY> section add:
<DIV id=tabDiv2><a href="javascript:hidepoptext();"><img alt="Click here to close" src="images/popout_menu.gif" width=14 border=0></a></DIV>
<DIV id=textdiv2>New content</DIV>


[BACK] [TOP]

 

MY SIMPLYTHEBEST - BLOGS - BOOKMARKS - GAMES - FONTS - HEADLINES
MUSIC - PIXELS - SCRIPTS - SOFTWARE - SOUNDS - WEB SEARCH

 


Copyright © 1997-2008 SimplytheBest Inc. Legal Disclaimer.
All copyrights acknowledged. All rights reserved.