Testing for the existence of an image file on another web server

2001-04-02 Thread John Fix 3rd
I want to include an image file that is on a server at another location. If no image exists, I want to display a message stating "No Image Available". I had it working fine for local images..here's the code: cfset ImageFile = "d:\webroot\images\" #Trim(sku)# ".gif" cfif

Re: Testing for the existence of an image file on another web server

2001-04-02 Thread Dick Applebaum
Use cfhttp reguest the image as the URL: "http://www.someotherdomain.com/somedirectory/someimage.jpg" Then if http.FileContent contains a "404" error code, the image was not found. HTH Dick At 10:17 AM -0400 4/2/01, John Fix 3rd wrote: I want to include an image file that is on a server

Re: Testing for the existence of an image file on another web server

2001-04-02 Thread Tony Schreiber
John, here's the best thing I found. Courtesy of Ron on this list: html head titleImage Not Found Test/title script language="JavaScript"!-- // make DARN sure this replacementImage file IS // present and accounted for, or you'll get a nasty // loop with repeated calls to this