Show & Hide Layers

Showing & Hiding Layers Dynamically

This is one article I wrote around 5 years back and it still works with most browser versions today and has been used and referred by lot of people for displaying a layer dynamically.

Since I can’t do all of the JS and CSS here in blog, I am just adding introduction here and providing link to the original article on my site.

Introduction – I have written an article with a working demo because I have seen this question appearing again and again in various JavaScript and DHTML news groups, forums etc. The code snippet given in the article shows and hides a <div> (layer) containing text and form elements programmatically. The code given here is compatible with IE 6+, Netscape 4.x 6.x and FireFox. It can be modified very easily to build pop up menus as well.

The layer (or div) given in the demo contains few form elements, and has a high z-index (specifies which component should stay on top), hence it stays on of all the contents. The code given in the article is separated in two parts, one part contains bare minimum CSS, and the other part contains the JavaScript code needed for showing and hiding the div.

Read Complete Article


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s