david_88
asked on
Check if link if image link
I have a url for product images given to me
If the image does not exist i want to display a default image but without following the image link i cant tell whether it exists, so can i do this in code
how do i detect that the image is not available in code?
thanks
dave
If the image does not exist i want to display a default image but without following the image link i cant tell whether it exists, so can i do this in code
how do i detect that the image is not available in code?
thanks
dave
ASKER
oh ok thats fine, im building in php do you have any example code
cheers
cheers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you could find is image.src is wrong path or unreadable by onerror event.. you could fire a javascript function by it
ASKER
Used the php option, but thanks both for your help
You'd have to do it in php, asp, jsp or similar.