korvirlol
January 3rd, 2010, 07:42 PM
Hi there,
Im not even sure if this is possible, but here is my scenario:
Im using some graphing software to visually represent different things for a web app im working on. There are many different types of graphs, but this isnt the problem - the graphs are working well.
What i trying to do is make each graph accessbile with ajax, so the user can view all the different types of graphs with different data without reloading the page, and this is where the problem is.
Its calling the graphs properly, and it is parsing the graphs properly, but returning the graph to the page isnt working. The graphing software im using uses the php GD library to draw the graph, so essentially, the ajax request is trying to return an image.
I didnt expect this to work initially, and i dont even know if its possible. The ajax request the image in its binary form (which i expected) and the page cannot interpret it. Things ive tried:
Updating the src of an <img /> element
Updating the innerhtml of a div with the raw image code
... and i dont know what else to try.
Any ideas?
Im not even sure if this is possible, but here is my scenario:
Im using some graphing software to visually represent different things for a web app im working on. There are many different types of graphs, but this isnt the problem - the graphs are working well.
What i trying to do is make each graph accessbile with ajax, so the user can view all the different types of graphs with different data without reloading the page, and this is where the problem is.
Its calling the graphs properly, and it is parsing the graphs properly, but returning the graph to the page isnt working. The graphing software im using uses the php GD library to draw the graph, so essentially, the ajax request is trying to return an image.
I didnt expect this to work initially, and i dont even know if its possible. The ajax request the image in its binary form (which i expected) and the page cannot interpret it. Things ive tried:
Updating the src of an <img /> element
Updating the innerhtml of a div with the raw image code
... and i dont know what else to try.
Any ideas?