x_goose_x
10-05-2002, 04:30 AM
Why is it that if I use
if (document.getElementById('mylayer3')) {
to test if a div is there it works no problem, but if I use a variable like so,
val = 3;
if (document.getElementById('mylayer'+val)) {
it doesn't work? I tried playing around with eval, but no luck. Any thoughts?
if (document.getElementById('mylayer3')) {
to test if a div is there it works no problem, but if I use a variable like so,
val = 3;
if (document.getElementById('mylayer'+val)) {
it doesn't work? I tried playing around with eval, but no luck. Any thoughts?