PDA

View Full Version : Closing a DIV


nikko50
02-24-2005, 03:53 PM
Hello all. How can I throw an onClick event to close a DIV. I would like to close it by it's ID. ID=LAYER_2

onClick="Javascript:window.theForm.layer_2.close()"

Spudhead
02-24-2005, 05:08 PM
Close it? You can't "close" a div. The only thing you can close is a window. If you want to hide the div, you can do it with:

onClick="javascript:document.getElementById("layer_2").style.display='none';"