I am writing a web page, where I would like to check if an image exists on the server or not. ie..
Something like above.
I've tried...
but it always returns false, even when the image exists. ??
Any ideas?
Code:
if(imageExists(image1.gif))
{
<img src='image1.gif'/>
}
else
{
//Do nothing
}
Something like above.
I've tried...
Code:
File file1 = new file(image1.gif);
if(file1.exists()) do this;
but it always returns false, even when the image exists. ??
Any ideas?