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

Contact Us

Script Library

Link to us!!!
Link to US!!!



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


Home : Layer Effects : Write To Layer

Change the contents of a layer, just by clicking on a link. You can include any HTML markup you want, and change any layer on the page. This could also be used to change layers onLoad, onMouseOver, or any other event you want to use. You could actually make an entire site, on one page, just using this one script.

Credits:
Created by: Eddie Traversa
Website: nirvana.media3.net
Browser Information: NN, IE4+, NN6
Additional Notes: Dreamweaver extension available at the author's website.

Demonstration:

Click to open example

Coding:
Copy and paste this code into the <HEAD> of your document:

selectall.gif

Instructions:
To write to your layer, you create a link, like this:

<a href="javascript:;" onClick="writetoLyr('TestLayer', '<p>See, it works!!!</p>')">Text</a>

In the function, first tell it wich layer to change (TestLayer in our case), and then what you want displayed in your layer. In order for this to work, you must name your layers. Example:

<div id="TestLayer">

Site designed, coded, and maintained by Web Shorts Site Design.
Copyright © 2000 - 2007 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

Free Webmaster Resources Web Templates Stock Photos Free Javascripts
Cartweaver ColdFusion Shopping Cart


<reallybig.com>
Web Builder Network Portal
Advertise
on the
Reallybig.com
Network