[SOLVED] Small Javascript

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
jslick
Forum Commoner
Posts: 35
Joined: Wed Jul 21, 2004 11:18 am

Small Javascript

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
jslick
Forum Commoner
Posts: 35
Joined: Wed Jul 21, 2004 11:18 am

Post by jslick »

duh! I can't believe I forgot that. Thanks feyd!
Post Reply