XML Link problem
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



XML Link problem Expand / Collapse
Author
Message
Posted 1/17/2008 3:48:57 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2/20/2008 5:48:10 PM
Posts: 4, Visits: 10
Okay so what I am doing is creating the XML data from a php script, in this XML for Fusion Charts you are suppose to be able to set link='javascript:<functionName>(<parameter>'

I have done some testing with this and cant figure out why I can't pass an alpha string to it. numeric strings work fine.
non-working:
link='javascript:drillArea(\"SomePlace\")' --- This becomes "Invalid XML Data in fusion Charts.

link='JavaScript:drillArea(SomePlace)'  ---- This becomes a javascript error of "SomePlace is not defined"

link=\"JavaScript:drillArea('SomePlace')\" ---- this becomes "Invalid XML Data in Fusion Charts.

Working:
link='javascript:drillArea(11350)'

the full string looks like this for the XML that is being passed to the FusionCharts

 <script type="text/javascript"> 
    Ext.onReady(function(){
       var chart_HDS = new FusionCharts("flash/MSColumn3D.swf", "HDS", "800", "300", "0", "1");
       chart_HDS.setDataXML("<chart caption='Datacenter total hds Storage vs. Free Storage' xAxisName='Datacenters' yAxisName='Storage (TB)' showValues='0' labelDisplay='ROTATE' slantLabels='1'><categories><category name='Bothell' /><category name='Dallas-ITO' /><category name='Windward' /><category name='WWDC-Lab' /></categories><dataset seriesName='phys'><set value='1149104' link='JavaScript:displayArea(\'SomePlace\')'/><set value='313606' /><set value='1057704' /><set value='53799' /></dataset><dataset seriesName='free'><set value='273591' /><set value='14305' /><set value='38439' /><set value='11276' /dataset></chart>")
       chart_HDS.addParam("wmode", "transparent");
       chart_HDS.render("HDSDiv");

     });
 </script> 

Post #3909
Posted 1/18/2008 3:40:48 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 1:19:54 AM
Posts: 870, Visits: 1,386
hi,

If you are using dataXML method to provide the XML then pleaseuse %26apos; instead of " in link='javascript:drillArea(\"SomePlace\")' so that it looks like link='javascript:drillArea(%26apos;SomePlace%26apos'.

For dataURL method you need to use &apos;

 

Regards,

Sudipto Choudhury
FusionCharts Team

Post #3921
Posted 1/18/2008 12:07:52 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2/20/2008 5:48:10 PM
Posts: 4, Visits: 10
the %26apos; solved my problems thanks for your help on this. Now onto figuring a way to pass php variables that was passed by javascript.

Thanks

Post #3942
Posted 1/18/2008 11:10:45 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 1:19:54 AM
Posts: 870, Visits: 1,386
hi,

Do you want to pass the values of the PHP variables to the javaScript function?

Regards,

Sudipto Choudhury
FusionCharts Team

Post #3950
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 2:45am


Execution: 0.047.