Re: Determining if an image exists
Re: Determining if an image exists
- Subject: Re: Determining if an image exists
- From: Olav Anderson <email@hidden>
- Date: Thu, 17 Feb 2005 15:47:03 -0800
Hi David,
I don't know if this is what you want but I use it to prevent a "broken image" icon if there isn't an image to load.
I add: onError="this.style.display='None'"
to the WOImage in the wod attributes.
If there is no image then nothing is displayed.
This seems to work fine for all browsers.
I considered pinging the server but thought that was too much trouble.
-Olav
On Feb 17, 2005, at 7:02 AM, David Griffith wrote:
Hi all,
Just wondered if anyone has a simple approach to use Java in WebObjects to determine if an image (or file) exists at a URL.
What I’m doing is fairly simple, I want to display up to 4 images which have dynamic URL’s. I want to check first if the image (URL) actually exists on the web server. If not, I don’t want to display it.
Any suggestions?
Kind regards,
David. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden