2

Using AJAX (Javascript and Classic ASP), I have a site that makes an XMLHTTP call to a REST server for some HTML. When the HTML is returned, Javascript populates a div's innerHTML with the results. So far, so good. All text and images appear perfect in IE9/10, but images do not appear (broken image icons show instead) in Firefox, Chrome and Safari. After searching for hours and testing again and again, I can only find one thing out of place.

The image file names (actual name of the file) includes "%2F". Here is an example image file name: 47662/thumbnails/image300l%2F57%2F59%2F60_gc10acoba_tb1-2095489_001.png. Note the path (47662/thumbnails/) and the file name (image300l%2F57%2F59%2F60_gc10acoba_tb1-2095489_001.png)

For one last quirk to this, If I go directly to the REST site via browser, login and navigate to the page where this image resides, the image displays correctly in all browsers. But when taking the HTML from the REST server call and inserting it into the div's innerHTML, images are not displayed correctly for FF, Chrome and Safari.

To date, I have tried to replace %2F with forward slashes and underscores. Both attempts fail to find the image file. If I paste the full URL of the image file into a browser, IE displays it while Chrome, FF and Safari pop up a download dialog box.

I am completely stumped and could really use some help. Thanks in advance!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.