Closed Thread Icon

Preserved Topic: invisible = new Image(); Pages that link to <a href="https://ozoneasylum.com/backlink?for=9042" title="Pages that link to Preserved Topic: invisible = new Image();" rel="nofollow" >Preserved Topic: invisible = new Image();\

 
Author Thread
Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 03-12-2004 19:49

if I created an image with 'new Image(height,width);', how do I display is to the screen?

I have this:
myImage = new Image(36,36);
myImage.src = "images/pulse.gif";
myImage.style.top = 100;
myImage.style.left = 150;
window.status = "Created image!";

and nothing but the '.status' is displayed.. any ideas?


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 03-12-2004 20:52

The fact that your image do not appear in the page is normal since you haven't appended it to the BODY of the page
simply add document.body.appendChild( myImage ) and voilà.

Cheers,

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 03-13-2004 06:55

wow... that was exactly it, thanks!!


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

« BackwardsOnwards »

Show Forum Drop Down Menu