• Content count

  • Joined

  • Last visited

About AdamVanBuskirk

  • Rank
    Forum Newbie
  1. Xml Error Regarding Setxmldata And Php

    I am getting the error: SyntaxError: missing ; before statement <set label='PowerCharts' value='339800' /> regarding the below code. When I include the exact same XML in a data file and use setXMLUrl instead of setXMLData, it works fine. I tried without the "" at the beginning and end as well as loading the variable chartInfo in PHP first and still the same result. Any help would be greatly appreciated. Thanks. <div id="chartdiv" align="center" ></div> <?php echo " <script type='text/javascript'> var chartInfo = \"\" <chart caption='AVG Days to Completion' subCaption='sub title' showLabels='0' showLegend='1' bgColor='FFFFFF' borderColor='616E9D' borderThickness='5' baseFontColor='FFFFFF' legendbgColor='414E7D'> <set label='test 1' value='232400' /> <set label='test 2' value='339800' /> <set label='test 3' value='411900' /> <set label='test 4' value='398400' /> </chart>\"\"; FusionCharts.setCurrentRenderer('javascript'); var myChart = new FusionCharts('../../FusionCharts/Doughnut2D.swf','chart','400','300','0','1'); myChart.setXMLData(chartInfo); myChart.render('chartdiv'); </script> ";