Hello everybody,

can any one please tell me how to disable the <div>. I have got the id of <div>.I
have tried $(divID).style.display = "block" and "none". But of no use
can any one please help me


can you post some of your code...
or try this example:
this will disable text box,select box by using div id..

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
function toggleAlert() {
function toggleDisabled(el) {
try {
el.disabled = el.disabled ? false : true;
if (el.childNodes && el.childNodes.length > 0) {
for (var x = 0; x < el.childNodes.length; x++) {

<div id="content">
<td><input type="text" name="foo" /></td>
<select name="bar">
<input type="checkbox" value="toggleAlert()" onclick="toggleAlert()" />

or use this line insted of your posted line:

document.getElementById('divID').style.display = 'none';
This article has been dead for over six months. Start a new discussion instead.