benjamin
02-28-2004, 08:51 PM
how do you check if an image has loaded properly in javascript?
|
Click to See Complete Forum and Search --> : how do you check if an image has loaded properly in javascript? benjamin 02-28-2004, 08:51 PM how do you check if an image has loaded properly in javascript? fredmv 02-28-2004, 09:53 PM Please be more specific. Generally, you'd use onerror or onabort, both of which may or may not be standardized. benjamin 02-28-2004, 10:01 PM i have a file browse thingy in a form and onchange makes that file appear on the page as a picture; if the picture has an error or it is an inavlid picture i want to call a function; i do know i can use substring to find the extention but that does not stop files that have errors any help much appreciated. fredmv 02-28-2004, 10:10 PM Sure; that wouldn't be all that complex. Do you have any code you're currently working with or what? All you'd need to do is get the filename of the image, append it to the page and have the event handlers listening for an error. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |