View Single Post
Old 07-07-2004, 03:37 AM   #5 (permalink)
LazyJim
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,821
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
Couple of things to remember...
Never use just a number for an ID, (start with a letter or _).
ID's are unique don't let anyone make more thant one element with the same ID.

If you need to disable an unknown amount of checkboxs put them all inside <span id="myCheckboxs"> ... </span> then to disable them all do...[code:1:7391e0e047]
var chbxs = document.getElementById("myCheckboxs").getElements ByTagName("INPUT");
// asuming the only input fields here are the correct type loop throught them all and disable each one...
for (var i in chbxs) {
chbxs[i].disabled = true;
}

// or if there are different INPUT tags within the <span> you need to add a check for the type="checkbox"...
for (var i in chbxs) {
if (chbxs[i].type == "checkbox") chbxs[i].disabled = true;
}[/code:1:7391e0e047]
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline   Reply With Quote