Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback on: irt.org FAQ Knowledge Base Q52

irt.org | About | Feedback | 1658 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q52

Sent by
Ryan Kelly on August 23, 2000 at 19:09:51:

Worth:
Worth reading

Length:
Too short

Technical:
Just right

Comments:

You can also use the Image() object to test for the existence of a generic image (or any number of images) without ever displaying them on the page:

function testImage(URL)
{
var tester=new Image();
tester.onLoad=isGood;
tester.onError=isBad;
tester.src=URL;
}

function isGood()
{
alert('That image exists!');
}

function isBad()
{
alert('That image does no exist!');
}

This can be useful if, for example, the user must specify an image and you want to check whether it exists before submitting the form.


Other feedback on 'irt.org FAQ Knowledge Base Q52' - show all


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.