Page 1 of 1

Small Javascript

Posted: Mon Jul 26, 2004 9:56 am
by jslick
I have used this strategy before but I guess I don't remember it:
function showdiv(x){
"desc"+x.style.visibility="visible";
}
what's wrong with "desc"+x?

Posted: Mon Jul 26, 2004 10:21 am
by feyd
it's likely having a problem with x.style.visibility.. it's probably thinking x is supposed to be an object..

Last time I did something like that, I needed to use eval.

Posted: Mon Jul 26, 2004 10:22 am
by jslick
duh! I can't believe I forgot that. Thanks feyd!