Hello

I've been researching this most of the day with no luck, hopefully someone here can provide some insight.

I should preface this by saying that although I am an experience Developer this is my 1st time using Web.

My issue,

I am designing an Internal Product Maintenance application for a Client using LANSA Webevent and they requested a clickable thumbnail (from a list of Products) which would then take them to that specific Products maintenance screen. All this works great, Images that are available are shown and clickable.

Problem I am having is when an image doesn't exist I need to insert an "Image Not Found" thumbnail. How can I test that the image hasn't shown? I get a box with a red 'x' in it when not found.

Thanks in advance for any help offered.

Recommended Answers

All 3 Replies

Hi Czr,

HTML is a markup language and not a scripting or programming language. You will likely be using a middleware scripting language such as PHP, ASP or the like. It would be an easy thing to do for php to check for existence and either show the image or substitute a 'broken image' image.

I hope this helps.

I don't fully understand what you are asking for so would you be able to paste some code snippets of the area you are wanting to solve?

Thanks
KG171

Well, since this thread isn't marked at solved - either you can use a middleware scripting language such as PHP to detect that the image is missing and substitute an alternate image OR, since what I think you may be asking is how to detect when the image IS missing - run a link checker like Xenu (it's free) to check the pages in question (or you can check the site error log). The missing image will show as a 404 error so you'll know which ones are missing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.