|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 12/21/2006 4:02:32 PM
Posts: 1,
Visits: 3
|
|
When I try use the javascript method for including a chart on a page and use the "setDataURL" method as illustrated here: <script language="JavaScript" src="/FusionCharts.js"></script> <div id="chartdiv" align="center">FusionCharts.</div>
<script type="text/javascript"> var chart = new FusionCharts("/charts/CandleStick.swf", "ChartId", "600", "400", "0", "0"); chart.setDataURL("/data.php?action=testcandlestick&type=xml"); chart.render("chartdiv"); </script>
I have the following result... my script, data.php is invoked by the chart movie but when I look at the $_GET variables that are passed to it I only receive the first variable; "action=testcandlestick". The second variable "type=xml" is never passed. I have done extensive testing and the URL is being passed into the FusionCharts.js methods properly; however, once inside the SWF and the callback to retrieve the data the query string is truncated. I need to be able to pass a full URL request with the entire query string to the server in order to process the requested data for the chart -- has anybody else experienced this problem? Suggestions? --Paul
|
|
|
|
|
FusionCharts Team
      
Group: Administrators
Last Login: 2 days ago @ 8:20:12 AM
Posts: 2,194,
Visits: 521
|
|
| You just need to URLEncode this entire URL. In all server side scripting languages, you've in-built functions to URLEncode the string. Or, in JavaScript, you can use the escape() function.
Thanks, Pallav Nadhani FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 7/5/2008 12:25:03 AM
Posts: 2,
Visits: 4
|
|
| hi I have some problem about use FusionCharts_Evaluation V3, I wanna passing url parameter for request xml data from server side (I use J2EE RestService for return xml  . example.. <script type="text/javascript"> var uRl = escape("http://localhost:8080/Test/rs/data/test"); var chart = new FusionCharts("../Charts/MSLine.swf", "ChartId", "600", "350", "0", "0"); chart.setDataURL(uRl); chart.render("chartdiv"); </script> and i use escape() javascript function already but It 's doesn't works. Thank you VNattawut.
supergolf
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: Today @ 7:54:06 AM
Posts: 644,
Visits: 1,948
|
|
Hi nattawut, Due to XSS attack flash file refuse http://localhost:8080. Here you are using full path with domain. You must provide relative path or absolute path with out domain then it will work.
Thanks,
Arindam FusionCharts Team
www.fusioncharts.com
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 7/5/2008 12:25:03 AM
Posts: 2,
Visits: 4
|
|
Thank you very much Arindam  It 's work already . (don't use full path) <script type="text/javascript"> var uRl = escape("/Test/rs/data/test"); var chart = new FusionCharts("../Charts/MSLine.swf", "ChartId", "600", "350", "0", "0"); chart.setDataURL(uRl); chart.render("chartdiv"); </script> if don't encode URL , is work too. <script type="text/javascript"> var chart = new FusionCharts("../Charts/MSLine.swf", "ChartId", "600", "350", "0", "0"); chart.setDataURL("/Test/rs/data/test"); chart.render("chartdiv"); </script> Thank a lot  VNattawut
supergolf
|
|
|
|