[Javascript] Hide show a TD

Marcelo Wolfgang grillo at gmail.com
Mon Jun 21 12:42:51 CDT 2004


I though of that,  my js knowledge came from actionscript, and in
flash if you have any object name started with a number it will simply
do not work

but I've tested it here, and it worked ok, it's only 4 itens also, I
will try my luck this time :)

Chris, also I didn't get the advantage of doing this:

var objEl = document.getElementById(id)
objEl.style.display = "whatever you want"

it will only be called once before the loop, next time it will replace
itself, something I should know here ?

I think you thought that I'm using the same element inside the
looping, but I'm calling :

document.getElementById(i) //only i not id

so I can close any other open <td>, sorry if I understood you wrongly

Thanks for all the answers till now

Grillo

On Mon, 21 Jun 2004 17:04:39 +0100, Laurent Muchacho
<laurentm at london.virgin.net> wrote:
> 
> Hi
> 
> I just notice something you shouldn't do. Is to use number or a number in
> the first character for your variable or the id of your div.
> If it work like that nice for you I had some problem long ago with the id of
> my div be called 1Div 2Div etc ... and it was fix by doing div1 div2 etc ...
> 
> Laurent
> 
>



More information about the Javascript mailing list