Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 583
  • Last Modified:

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

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
parumuga
Asked:
parumuga
1 Solution
 
PhatzerCommented:
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
 
parumugaAuthor Commented:
Solution was useful
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now