wichosaenz
Posts: 15
|
Posted: 02/02/2009, 2:48 PM |
|
I have a Chart Flash with static parameters (in desing), but i want change the parameters (execute) the ASP Page. Example.
I have 4 link, each one read "Bar", Pie", Line" etc, etc.
I could program a little JavaScript function when a click event of the link and my Chart Flash change the type, but how i can change de XML Code of this Flash Chart?
Because in this xml code have all the parameters.
Thanks, I will waiting your help or some tip.
|
|
|
wichosaenz
Posts: 15
|
Posted: 02/05/2009, 9:01 AM |
|
Well i was using two way:
Change the Value of an Attribute
In the DOM, attributes are nodes. Unlike element nodes, attribute nodes have text values.
The way to change the value of an attribute, is to change its text value.
This can be done using the setAttribute() method or using the nodeValue property of the attribute node.
Change an Attribute Using setAttribute()
The setAttribute() method changes the value of an existing attribute, or creates a new attribute.
xmlDoc=loadXMLDoc("FlashChart.xml");
x=xmlDoc.getElementsByTagName('Title');
x[0].setAttribute("text","El titulo del Flash Chart que yo deseo");
Change an Attribute Using nodeValue
The nodeValue property can be used to change the value of a attribute node:
xmlDoc=loadXMLDoc("FlashChart.xml");
x=xmlDoc.getElementsByTagName("Title")[0]
y=x.getAttributeNode("text");
y.nodeValue="El titulo del Flash Chart que yo deseo";
And this you can modify the XML file in the FlashChart
|
|
|
|