Re: Internet Explorer Web Development JScript: spec for "new Image"?
unique_username
According to the specs, when Netscape defined them, the Image constructor takes 2 optional parameters, width & height.
var foo = new Image();
or
var foo = new Image(400, 300);
if you want to set the url, just set the src attribute...
foo.src = 'http://www.yourDomain.com/images/foo.png';
For the record, you can use the DOM now to do this as well...
var foo = document.createElement('img');
foo.setAttribute('src', 'http://www.yourDomain.com/images/foo.png');
PS Dev Guru is a great site for JavaScript information. It will even identify which methods are unsupported by Internet Explorer, and those that IE added that are not part of the spec.
http://www.devguru.com/Technologies/ecmascript/quickref/image.html
Cheers,
Steve