Forum Moderators: phranque
However, not all titles have images and when the code is included in the page I get the broken image thing.
The url is [theirdomain.com...]
I just replace ISBNNUMBER with each real ISBN on the page.
How can I show a "no image" icon when there isn't an image for that ISBN?
Is it possible?
My site is a hosted cart running on ASP.
Thanks for reading this far.
On each page that you wish to hot link (make sure you have the other sites permission) add the following code at the top of the page.
<%
On Error Resume next
url = "http://www.qraybracelets.com/images/deluxe-nat-ahead.jpg"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send "" myStatus = (xmlhttp.status)
set xmlhttp = Nothing
%>
Now, you have a value in the myStatus variable. It will be a 200 if the file is found in which case you would display the image (using a small amount of script). If it is not a 200 just display your no image icon.