Return to Snippet

Revision: 10594
at January 5, 2009 10:05 by eden159


Initial Code
<html>
<head>
<script type="text/javascript">
<!--
function getImage(pExistingImageID, pImageURL){
    var img = document.createElement('img');
    img.onload = function (evt) {
        document.getElementById(pExistingImageID).src=this.src;
        document.getElementById(pExistingImageID).width=this.width;
        document.getElementById(pExistingImageID).height=this.height;
    }
    img.src = pImageURL;
    return false;
}
//-->
</script>
<title>Remote Image 5</title>
</head>

<body>
<p><a href="#" onclick="return getImage('placeHolder','/images/rdivilbiss.jpg');">Get Remote Image</a></p>
<p><img id="placeHolder" border="0" src="/images/placeHolder.jpg"></p>
</body>
</html>

Initial URL
http://www.rodsdot.com/ee/scriptingRemoteImages.asp

Initial Description

                                

Initial Title
Load images after the web page is loaded

Initial Tags
javascript, image, html, load

Initial Language
JavaScript