What's the best way to check if an image file exists? I want to avoid the
default browser "image not found" icon and replace with my own. Currently I
use "Test Path Name", but this seems really slow. The nuts and bolts of my
code looks something like this:
<% If(Test Path Name("/Pictures/"+[Item]Name+"_thumb.jpg")>0) %>
<img src="/Pictures/"<% Write([Item]Name) %>+"_thumb.jpg">
<% Else %>
<img src="/Pictures/Not_Found.jpg" >
<% End IF %>
Which works fine for a few images, but now I have it in a loop for around
100 items, and the delay is several seconds to test all the path names. If
I remove this code and just try to load the thumbnail without checking
first, the page is quick as a whip, but I get the default browser "image not
found" for the images that don't exist.
Thanks,
Jason
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/