"Douglas Crockford" <nospam (AT) laserlink (DOT) net> writes:
Quote:
People who are new at this should never use eval(). Never. But you
should get in the habit of making your code more readable. It is
hard to make it right if it is hard to look at. |
Except that this doesn't work.
Quote:
function imgOn(imgName) {
if (document.images) {
document[imgName].src = imgName + "on.src"; |
Should be:
document[imgName].src = window[imgName + "on"].src;
/L
--
Lasse Reichstein Nielsen - lrn (AT) hotpop (DOT) com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'