Open Tech Support
Open Tech Support Archives
Back to HomeCommunityReviewsGuidesDownloadsTech LinksMarketplaceContact Us
 »  SITE NAVIGATION
»  OTS Home
»  OTS Forums
»  OTS Archives

»  About our site
»  Search our site
»  Support our site

»  What is this site?
»  Who are we?
 
 
 »  ADVERTISMENT
 
  Pages: 1

JavaScript: IMAGE object question

(Click here to view the original thread with full colors/images)


Posted by: scottharden

In JavaScript, what are the properties of the IMAGE object?

I know very little about JS and have a project that I have to complete soon. We have a video camera on a highway connected to a hardware device that is FTPing the video images to an FTP server that in turn puts the image on a web server. My script is constantly loading the images as they are updated on the web servere and overwriting the image in a browser with the new image. It only updates the image when a successful image load occurs, but while the image is being uploaded to the FTP server, the file size is 0 but the image exists. So, the script downloads the 0 byte image file and updates the browser with the empty image. I need to be able to detect that the image is empty and not update if the file is 0 bytes.

Any ideas?

Thanks,
Scott Harden



Posted by: Scav

The only javascript property for images i know if is image.src but that would not do what you want. Whatever yer doing sounds more like it might take something a little more than javascript. I know cgi can detect if files exist with the -e thing but I dont know if that can even figure out their file size.



Posted by: scottharden

ok, I figured out that the properties of a javascript image object are simply the properties of an HTML image (src, height, width, border, etc.) They are the same thing.

Scott



 
Copyright 2000-2008 Open Tech Support.  All Rights Reserved.  Site Design and Development by Tolitz Rosel.