disable all objects defined in a column

R

Rithish Saralaya

I have a column in a table as follows,

<TD ID='COL_ID_1'> Test Text <IMG ID='IMG_ID_1'
SRC='http://myServer.com/images/myImg.gif' onClick=\"alert ( 'clicked'
)\"></TD>
I want to disable the whole column, alongwith all its data defined
within it.

I tried using document.all ( 'COL_ID_1' ).disabled = true; However,
this disables only the text within the column. I have to loop through
the children of the TD to disable all objects defined within.

child = document.all ( 'COL_ID_1' ).children;
tot_children = child.length;
for ( i=0; i<=tot_children-1; i++ )
{
document.all ( child(i).id ).disabled = true;
}


Is this the proper way, or am I doing wrong? Why does not the first
approach work for all child objects of the TD?
The target browser is IE5+. Any help/advice/suggestions would be
greatly appreciated.

Regards,
Rithish.
 
A

Alberto

Loop the child nodes as you do, that's the most sensible way to do that for
me.

ciao
Alberto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top