wichosaenz
Posts: 15
|
Posted: 02/02/2009, 2:53 PM |
|
Tengo un Flash Chart diseñado en Codecharge, y con parametros estaticos para que se muestren en una pagina ASP 3.0.
Deseo poner 4 ligas, y cada una sea un tipo diferente de grafico Flash Chart, ejemplo: Barras, Pastel, Lineas etc etc.
Quisiera programar un pequeño codigo JavaScript para que en el evento OnClick de dichas ligas se modifique el codigo XML donde se aloja toda la información de los parametros de mi grafico.
Existe alguna forma de modificar ese XML?
Gracias! estaré esperando su ayuda o bien algun consejo para hacerlo de otra forma diferente y se cumpla mi objetivo.
|
|
|
wichosaenz
Posts: 15
|
Posted: 02/03/2009, 3:50 PM |
|
Creo que me la estaba complicando en quere modificar el XML, aunque no es la mejor opcion optima lo que hice fue lo siguiente.
Cree N archivos XML con la modificación que deseo, y por medio de una funcion CASE decido que archivo XML usar y lo hago aqui:
'Grafico Execution @2-EA4A7C0F
FlashChartGrafico.OutputFormatter = CCCreateTemplateFormatter( TemplateFilePath & "cpa_G01AGrafico.xml")
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "Content-type", "text/xml"
Response.Expires = -1
Response.Write FlashChartGrafico.Execute
Set FlashChartGrafico = Nothing
Response.End
'End Grafico Execution
Asi de esa manera solo modifico el archivo XML que deseo.
He preguntado mas de tres veces y nunca he recibido ayuda, pero he procurado poner mis soluciones para aportar, espero haya comunidad aqui.
|
|
|
wichosaenz
Posts: 15
|
Posted: 02/05/2009, 9:06 AM |
|
Esta seria otra manera, solo que la postee en ingles.
Seria la opción más optima para modificar el archivo XML con el que se basa el Flash Chart
Saludos a la comunidad!
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
|
|
|
|