Re: JavaScript problem...

by "Bert Doorn" <bdoorn(at)iinet.net.au>

 Date:  Sun, 28 May 2000 16:53:38 +0800
 To:  "Jennifer C. Swartz" <eandscon(at)javanet.com>,
"HWG Basics List" <hwg-basics(at)mail.hwg.org>
 References:  javanet
  todo: View Thread, Original
G'day

> Line 12
> Char 3
> Error 'image' is undefined
> Code 0

Like it says: 'image' is undefined, i.e. the variable does not exist.  Image
is a core language object from Javascript 1.1 onwards (i.e. built in) but
Javascript differentiates between Image and image (diferent case)

Change this line:
    rslt = new image();
To this line:
    rslt = new Image();

Note the capital I.  Same goes for 'new Array()' and 'new Date()' (to mention
a couple).

That solved the problem for me.  As to why it's stopped working when it did
before, I can only presume that you or some editing program somehow changed it
from Image to image.

HTH
--
Bert Doorn, Web Developer
http://www.bwdzine.com/
http://www.betterwebdesign.com.au/

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA