I want to use a array created in javascript whoes value is drived from a xml file by DOM.
now i want to use that array to creat the google chart by calling that array value in the imge source path.
now want to use the "valueArray " in xsl to set image attribute
ex:
Thus insted of "chd=t:1,1,1,3, 1,2,2,2" i want to use "chd=t:$valueArray"
Can any one help me out how to write the xsl for the same using javascript variable in xsl
now i want to use that array to creat the google chart by calling that array value in the imge source path.
Code:
var valueArray = new Array();
var myId = document.getElementById("GraphThisTable");
var rows = myId.getElementsByTagName("tr");
for(i = 1; i != rows.length; i++)
{
var cols = rows[i].getElementsByTagName("td");
valueArray[i - 1] = cols[1].innerHTML;
}
alert(valueArray);
ex:
Code:
<img><xsl:attribute name="src">http://chart.apis.google.com/chart?cht=p3&chd=t:1,1,1,3,1,2,2,2&chs=250x100&chl=2001|2003|2004|2000|2002|3001|3002|3003</xsl:attribute></img>
Can any one help me out how to write the xsl for the same using javascript variable in xsl
Comment