By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,862 Members | 1,767 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,862 IT Pros & Developers. It's quick & easy.

Display Images

P: n/a
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><
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
==============================
"Qingdong Z." <an*******@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
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><

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.