DHTML Shock
Articles/Tutorials
Discussion Forum
Latest Additions
FAQs
Link to us
Submit-a-Script
Web Design Toolbox
Wish List

Contact Us

Script Library



Send-To-Friend | Script Problem?
Shock Toolbox | Recommended Reading

Electrify your web site with our free copy and paste DHTML scripts, free DHTML Menus, free Dynamic HTML tutorials and javascript.

Home : Layer Effects: Custom Popup Windows

Just click on the demonstration links to open up the small popups. The have see through title bars, which create a very nice effect. Click and drag the title bar to move the layer around the page. Check Lars' site for some other implentations of this script.

Credits:
Created by: Lars Bosboom
Website: home.planet.nl/~asattler
Browser Information: IE5, IE 5.5
Additional Notes: None

Demonstration:
First window | Second Window

Coding:
Copy and paste this code into the body of your document:


Instructions:
To customize your windows, you'll need to edit the following lines:

Title bar color and opacity:
titlecolor = "black";
opacitytitle = 45;

Windows:
You can add as many new windows as you want. Just add additional functions in your script, like this:

function firstwindow()
{
outp = "";
outp += "<center><h2>In this window you can place everything you want.</h2>";
raam(outp, "lightblue",400,200);
}

Just add additional outp += lines to increase your content. Change the "lightblue" to the color of your layer background, and change the 400,200 to the desired height and width.

You can specify your own background image by typing:

raam(outp, 300, 500, back.jpg);

and you can specify an HTML document:

raam("page.HTML", 300, 500);

To open the layer:
Your link should look like this: <a href="javascript:;" onClick="firstwindow()">. Just change the firstwindow() to the name of the function you want to open.

Site designed, coded, and maintained by Web Shorts Site Design.
Copyright © 2000 DHTML Shock.
Please read the Terms Of Use before using any of the scripts.
DHTML Shock Privacy Policy | Support DHTMLShock
PO Box 80575, Portland, Oregon 97280

Reallybig.com Developer Network, The Complete Resource for All Web Builders. Contains more than 5000 resources. Formerly known as reallybig.com.
Network Portal
Reallybig.com
The Largest directory of Web Building resources on the 'Net!
BigNoseBird.com
FREE CGI scripts, tutorials, essential HTML tricks and more!
FontPool.com
1000+ Truetype fonts for MAC & PC!
GraphxKingdom.com
Thousands of free Icons & Clipart & Themes!
Free-Backgrounds.com
Hundreds of eye-popping Backgrounds & Textures
DHTMLShock.com
Add life to your site with these DHTML scripts!
Java-Scripts.net
Cool and easy effects with cut-and-paste Javascripts!
SEARCH THE
NETWORK
ADVERTISE

Search
DHTML Shock