Display Images

G

Guest

I have a web page to work as Video Web Viewer. It pulls image from IP camera using JavaScript. It works great in most of time. When users are in slow network,

the Internet Explore begins to display part of the image before the image is fully downloaded, so the video looks like broken sometimes.

I remember that web Brower used to have an option <Show Picture after Downloaded>. I can not find it in Internet Explore settings. Your advices on JavaScript or

Web Brower setting are high appreciated. I don't want to use Java in this page. Thanks

Here is the sample code:

<HTML><HEAD><SCRIPT language="Javascript"
var imgURL = "http://ipaddress/image.aspx"
function Image_onload() {
document.xxxx.imgCamera.src = imgURL + '&' + (new Date().getTime());;

</SCRIPT></HEAD><body
..
<IMG name="imgCamera" onload="Image_onload();" src="http://ipaddress/image.aspx"></IMG
..
</body><
 
V

Vidar Petursson

Hi

The standard is doing it with JavaScript..

function getImg(sSrc){
var i = new Image();
i.src = sSrc;
i.onload = dispPic;
i.onerror = errHandler;
}

function dispPic(){
document.images["TARGET_IMG_NAME"].src = this.src;
}

function errHandler(){
alert("Error getting image");
}

--
Best Regards
Vidar Petursson
==============================
Microsoft Scripting MVP
http://www.microsoft.com/technet/scriptcenter
==============================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top