This Must be Do-able

wxdqz

New Member
How could I tell the browser that if a picture is not found where I told it to find it, then use another picture.

Does the browser even know it didn't find the picture.
example: I would use an image flip with two images that have been preloaded.


im1= new Image(x,y);
im1.src="someDirectory/somePic1.gif";
im2= new Image(x,y);
im2.src="someDirectory/somePic2.gif";

<img name="imA" src=http://www.webdeveloper.com/forum/archive/index.php/"someDirectory/somePic1.gif" onClick="this.src='im2.src'">

So what I want to do is if there is no "im2.src" because the image is not there, then display someother picture.

Thanks
(This is an important part I need to solve to be able to acheive a greater evil :-)
 
Back
Top