Hi I have this php code which ends up with xml data in a string, I then use onClick to send it to a js function
$strXML = "<chart><set label='B' value='12' /><set label='C' value='10'/></chart>"
<td align='right' onClick='drawchart($strXML)' >£ $totalcost </td>
However when it gets to my js function it does not work and the data is corrupt
function drawchart(dataX) {
var chart1 = new FusionCharts("../charts/Pie3D.swf", "chart1Id", "400", "300", "0", "1");
chart1.setDataXML(dataX);
chart1.render("chart1div");
}
Can anyone tell me how to correctly send the xml data via a js variable ?
Thanks