this is a simple question and I´ve read many posts here about my problem. Everytime there is a solved problem but my problem still exists.
I will load a image
source via jquery post. The page is written in php
.
echo "<a href=\"#\" onClick=\"
$.post('/_test.php', {'call':'Chart_Test','ChartXml':'<xml><Name>Test</Name><Width>500</Width><Height>300</Height></xml>'}).always(function(imgdata) { $('#target').attr('src','data:image/png;base64,' + imgdata);});\" > Load Chart </a>";
<img id=\"target\" width=\"500\" height=\"300\" src=\"\" />
The post calls the right function and gets an images/png. But with base64 or only pushing imgdata to src without success. in FireBug the headers are right and the imagesize is right. But the Preview looks like this if I use
base64:
�PNG
IHDR�,��֟tRNS���7X} IDATx���y|T��7��9g�}2��$dc�BEA
"*X�b�^����ۺ�Vm]n�V���.�M�[�v��[��^�}l)��B$$��>�d��,�dž ���9��|���̙3g��|��r��#I!$�s�$9�eI�0�
��baB���e|� %|[Bl��s-��cֺ"���j]�'dŠ/�XH���<7$�×|,+�.
�H���A�a���c��S�>��}H~�/p���VYnֶ*����3� !1aw�����c�n
��St��a�N�X�x$I�1V���.$I���S?�ڒ�d$a�ך�wm�NϹ�~�H����q�wdU3��p8�Fy����Ԑ�d"�H(�b���:r��3_4t]c�}�៵�~�e�+r�k^rA�I��}�^�ahhH��m�OP��r�d�z��L�lp����_�h�� ��qg�� !<�Sx
^����BB�p�����pc����>
Where is the - maybe - little mistake?