javascript - Display dynamically created php image after POSTing data -
i have php script outputs image, how can post data , display resulting image without refreshing rest of screen, far have got code below returns png.
function go(){ $.post("test_image.php", $("frm").serialize(), function(data){ //alert(data);//proves png image returned. //how display returned image (preferably '$("#modified")') }); }
i can't display returned image.
you take resulting data , put data:
uri (more info here) won't work in ie, slow, not cachable in way , uses 33% more memory necessary due base64 encoding.
the elegant way script write image data file, , return url of new image.
your ajax callback simple
$("#myimage").src = data;
Comments
Post a Comment