Scripting image.complete : JavaScript DHTML examples (example source code) » HTML » Image Img

JavaScript DHTML
C++
Java Products
Java Articles
JavaScript DHTML Home  »   HTML   » [  Image Img  ]   
 

Scripting image.complete

Please note that some example is only working under IE or Firefox.

/*
JavaScript Bible, Fourth Edition
by Danny Goodman 

Publisher: John Wiley & Sons CopyRight 2001
ISBN: 0764533428
*/

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript1.1">
function loadIt(theImage,form) {
    form.result.value = ""
    document.images[0].src = theImage
}
function checkLoad(form) {
    form.result.value = document.images[0].complete
}
</SCRIPT>
</HEAD>
<BODY>
<IMG SRC="cpu2.gif" WIDTH=120 HEIGHT=90 onLoad="">
<FORM>
<INPUT TYPE="button" VALUE="Load black" onClick="loadIt('http://www.java2s.com/style/logo.png',this.form)">
<INPUT TYPE="button" VALUE="Load red" onClick="loadIt('http://www.java2s.com/style/logoRed.png',this.form)"><P>
<input TYPE="text" NAME="result">
</FORM>
</BODY>
</HTML>
Related examples in the same category
1.  Monitors the load process and the display of pictures
2.  Image Animation
3.  Image array
4.  Replace image
5.  An animating image
6.  Mouse in image and out
7.  Scrolling Image
8.  Change the height of an image
9.  Change image
10.  Change image width
11.  Count images in a document
12.  Image Event Handling
13.  Methods and Properties of the Image Object
14.  Testing an Image's align Property
15.  A Scripted Image Object and Rotating Images
16.  Changing Between Still and Motion Images
17.  Simple Image Replacement
18.  Image Error Finder
19.  Image element
20.  Image Roller Machine








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.