Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>All of that javascript you have in the PHP file, you need to put that into the html file. Well, that's the way I'd do it at least. Otherwise, you'll have to use jQuery's live() function to call those javascript functions you have in the PHP file.</p> <p>For instance, your script tag in the html file should look like this</p> <pre><code>&lt;script type="text/javascript"&gt; function Function4PHPHTML() { var myChart = new FusionCharts("../Charts/HLinearGauge.swf", "chart3", "580", "80", "0", "0"); myChart.setDataXML("&lt;chart bgColor='FBFBFB' bgAlpha='100' showBorder='0' chartTopMargin='0' chartBottomMargin='0'\n upperLimit='30' lowerLimit='0' ticksBelowGauge='1' tickMarkDistance='3' valuePadding='-2' pointerRadius='5'\n majorTMColor='000000' majorTMNumber='3' minorTMNumber='4' minorTMHeight='4' majorTMHeight='8' showShadow='0'\n pointerBgColor='FFFFFF' pointerBorderColor='000000' gaugeBorderThickness='3'\n baseFontColor='000000'\n gaugeFillMix='{color},{FFFFFF}' gaugeFillRatio='50,50'&gt;\n &lt;colorRange&gt;\n &lt;color minValue='0' maxValue='5' code='FF654F' label='z'/&gt;\n &lt;color minValue='5' maxValue='15' code='F6BD0F' label='x'/&gt;\n &lt;/colorRange&gt;\n &lt;/chart&gt;"); myChart.render("chart3"); } function loadXMLDoc() { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("ajax").innerHTML=xmlhttp.responseText; } } xmlhttp.open("POST","test.php",true); xmlhttp.send(); } &lt;/script&gt; </code></pre> <p>Then, you have the AJAX, retrieve only HTML from that PHP file.. So that after you click that DIV and populate whatever, you already have the existing Javascript ready for the new html.</p>
 

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