Re: javascript prob

From: Date: Sun, 22 Oct 2000 15:39:09 +0000
Subject: Re: javascript prob
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21639@lists.php.net to get a copy of this message
At 6:54 PM +0930 10/22/00, scott wrote:
How do I reference an image which is sitting in a layer in JavaScript. I am trying to do rollovers. Have them working great when outside of a layer, but when they get in layers, they don't work. Javascript Console in NN says not an object my code is below: function imgOn(imgName)
    if (document.images)
        if (current == imgName)
            document[imgName].src = eval(imgName + "off.src");
        } else
            document[imgName].src = eval(imgName + "on.src");
        }
    }
} function imgOff(imgName)
    if (document.images)
        if (current == imgName)
           document[imgName].src = eval(imgName + "on.src");
        } else
            document[imgName].src = eval(imgName + "off.src");
        }
    }
} thanks (sorry but I didn't know where else to ask this!!) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
-- __________________________________________________ Marc Antony Vose I am Suzerain Studios therefore I think __________________________________________________

« previous php.general (#21639) next »