<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Forum HTML.it - JavaScript</title>
		<link>https://forum.html.it/forum/</link>
		<description>Per discutere di JavaScript, Ajax e DHTML</description>
		<language>it</language>
		<lastBuildDate>Sat, 01 Aug 2026 02:13:20 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>https://forum.html.it/forum/images/misc/rss.png</url>
			<title>Forum HTML.it - JavaScript</title>
			<link>https://forum.html.it/forum/</link>
		</image>
		<item>
			<title>Google chart non apre immagine png tramite base 64</title>
			<link>https://forum.html.it/forum/showthread.php?threadid=2979858&amp;goto=newpost</link>
			<pubDate>Tue, 07 Jul 2026 17:02:33 GMT</pubDate>
			<description>salve a tutti il mio problema rimane anche dopo aver cercato per su e giù sul web; ed è questo. 
Se premo il bottone STAMPA, pur avendo la stringa in...</description>
			<content:encoded><![CDATA[<!-- BEGIN TEMPLATE: postbit_external -->
<div>salve a tutti il mio problema rimane anche dopo aver cercato per su e giù sul web; ed è questo.<br />
Se premo il bottone STAMPA, pur avendo la stringa in base64, non si apre l'immagine associata, perché?<br />
Posto il codice<br />
<!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div class="bbcode_container">
	<div class="bbcode_description">codice:</div>
	<hr /><code class="bbcode_code">&lt;HTML&gt;&lt;HEAD&gt;<br />
&nbsp; &lt;script type=&quot;text/javascript&quot; src=&quot;https://www.gstatic.com/charts/loader.js&quot;&gt;&lt;/script&gt;<br />
&lt;script type=&quot;text/javascript&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; google.charts.load('current', {packages: ['corechart', 'bar']});<br />
&nbsp; &nbsp; &nbsp; &nbsp; google.charts.setOnLoadCallback(drawBarColors);<br />
&nbsp; &nbsp; &nbsp; &nbsp; function drawBarColors() {<br />
&nbsp; &nbsp; &nbsp; var data = google.visualization.arrayToDataTable([<br />
&nbsp; &nbsp; &nbsp; &nbsp; ['Dati', 'PALLE PERSE','PALLE RECUPERATE','ASSIST','GOAL FATTI'],<br />
&nbsp; &nbsp; &nbsp; &nbsp; ['', &lt;%=ConteggioPalleP%&gt;, &lt;%=ConteggioPalleR%&gt;, &lt;%=ConteggioAssist%&gt;, &lt;%=ConteggioGoal%&gt;]&nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; ]);&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; var options = {<br />
&nbsp; &nbsp; &nbsp; &nbsp; title: 'Dati Tecnici Atleta',<br />
&nbsp; &nbsp; &nbsp; &nbsp; chartArea: {width: '50%'},<br />
&nbsp; &nbsp; &nbsp; &nbsp; colors: ['#ffab91','#f0ea47','#2943e1','#19d145'],<br />
&nbsp; &nbsp; &nbsp; &nbsp; hAxis: {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; title: 'VALORI',<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; minValue: 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; },<br />
&nbsp; &nbsp; &nbsp; &nbsp; vAxis: {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; title: 'DATI'<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; var chart_div = document.getElementById('chart_div');<br />
&nbsp; &nbsp; &nbsp; var chart = new google.visualization.BarChart(chart_div);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; // Wait for the chart to finish drawing before calling the getImageURI() method.<br />
&nbsp; &nbsp; &nbsp; google.visualization.events.addListener(chart, 'ready', function () {<br />
&nbsp; &nbsp; &nbsp; &nbsp; chart_div.innerHTML = '&lt;img src=&quot;' + chart.getImageURI() + '&quot;&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; console.log(chart_div.innerHTML);<br />
&nbsp; &nbsp; &nbsp; });<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; chart.draw(data, options);<br />
document.getElementById('png').outerHTML = '&lt;a href=&quot;'+chart.getImageURI()+'&quot;&gt;STAMPA&lt;/a&gt;';&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; &lt;/script&gt;<br />
&lt;/HEAD&gt;<br />
&lt;body bgcolor=&quot;#7A8996&quot;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&lt;div id=&quot;chart_div&quot; style=&quot;width: 620px; height: 300px;&quot;&gt;&lt;/div&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;table&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;&lt;td&gt;&lt;div id='png'&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/table&gt;<br />
&lt;/BODY&gt;<br />
&lt;/HTML&gt;</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable --></div>


<!-- END TEMPLATE: postbit_external -->]]></content:encoded>
			<category domain="https://forum.html.it/forum/forumdisplay.php?forumid=3">JavaScript</category>
			<dc:creator>devil946</dc:creator>
			<guid isPermaLink="true">https://forum.html.it/forum/showthread.php?threadid=2979858</guid>
		</item>
	</channel>
</rss>
