Note that there are some explanatory texts on larger screens.

plurals
  1. POChanging src of an img
    primarykey
    data
    text
    <p>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.</p> <p>I will load a <code>image</code> source via jquery post. The page is written in <code>php</code>.</p> <pre><code>echo "&lt;a href=\"#\" onClick=\" $.post('/_test.php', {'call':'Chart_Test','ChartXml':'&lt;xml&gt;&lt;Name&gt;Test&lt;/Name&gt;&lt;Width&gt;500&lt;/Width&gt;&lt;Height&gt;300&lt;/Height&gt;&lt;/xml&gt;'}).always(function(imgdata) { $('#target').attr('src','data:image/png;base64,' + imgdata);});\" &gt; Load Chart &lt;/a&gt;"; &lt;img id=\"target\" width=\"500\" height=\"300\" src=\"\" /&gt; </code></pre> <p>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 </p> <pre><code>base64: �PNG IHDR�,��֟tRNS���7X} IDATx���y|T��7��9g�}2��$dc�BEA "*X�b�^����ۺ�Vm]n�V���.�M�[�v��[��^�}l)��B$$��&gt;�d��,�dž ���9��|���̙3g��|��r��#I!$�s�$9�eI�0� ��baB���e|� %|[Bl��s-��cֺ"���j]�'dŠ/�XH���&lt;7$�×|,+�. �H���A�a���c��S�&gt;��}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�� !&lt;�Sx ^���Ź�BB�p�����pc����&gt; </code></pre> <p>Where is the - maybe - little mistake?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload