Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Display Images

Reply
Thread Tools

Display Images

 
 
=?Utf-8?B?UWluZ2RvbmcgWi4=?=
Guest
Posts: n/a
 
      05-20-2004
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><
 
Reply With Quote
 
 
 
 
Vidar Petursson
Guest
Posts: n/a
 
      05-21-2004
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." <> wrote in message
news:3078A00E-A423-4060-9C11-...
>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><



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't view images on Google Images timopp@gmail.com Computer Support 5 12-30-2005 01:45 AM
DataList with RadioButtons + Images: How to click on the images to activate the radiobutton? Luis Esteban Valencia Muņoz ASP .Net 0 06-03-2005 03:22 PM
Track Images added to images folder and subfolders - send out email alerts ASP .Net 4 01-04-2005 10:01 PM
Tool for converting 12-bit TIFF images to 16-bit TIFF-images? Peter Frank Digital Photography 11 12-13-2004 02:41 AM
Can recover old images from SmartMedia card, but not recent images Stephen Stormont Digital Photography 9 10-20-2003 07:59 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57