Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback on: irt.org FAQ Knowledge Base Q52, August 23, 2000 at 19:09:51:

You are here: 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

©2018 Martin Webb