Solved

Urgent: Important:  Image as responseText or responseXML in Ajax response

Posted on 2009-04-08
2
539 Views
Last Modified: 2013-12-13
How to get image as responseText or responseXML in Ajax response?

I am using PHP to display image (using echo).

I need to get this image as a responseText or responseXML in the Ajax. How to display the image in the browser using Ajax?

Are there any approaches to have image payload in Ajax responseXML?

Ajax experts, please help me.
0
Comment
Question by:parumuga
2 Comments
 
LVL 10

Accepted Solution

by:
Phatzer earned 500 total points
ID: 24096383
I think you'd need to open the contents of the file, base64 decode it and send that to javascript, but im not sure about base64 decoding on the javascript end. I think that could be a solution though.
0
 

Author Closing Comment

by:parumuga
ID: 31567986
Solution was useful
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question