setDataURL woes
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



setDataURL woes Expand / Collapse
Author
Message
Posted 4/22/2008 3:21:23 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/7/2008 1:18:33 PM
Posts: 8, Visits: 13
Hello,

In a page that I'm working on, I can use the following for a fusiongadget gauge:

<div id="chart4" align="center">

<script type="text/javascript">

var myChart = new FusionCharts("FG/Charts/AngularGauge.swf", "chart4", "180", "100", "0", "0");

myChart.setDataURL("http://server_name/check_table.cgi?tabName=table5");

myChart.render("chart4");

</script>

</div>

This works fine and the guage displays. However, on the same page I am trying to do the same thing with a MSColumn2D.swf chart... but it's not working. I get an "Error in loading data" message.

I've verified the XML is correct.

Any ideas?

Thanks!

Post #5857
Posted 4/23/2008 1:48:54 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 6:02:32 AM
Posts: 764, Visits: 1,215
hi,

Could you please try using relative URL instread of using absolute URL (one that has http://.. ). Newer version of charts does not allow absolute URL to stop XSS Attacks.

Regards,

Sudipto Choudhury
FusionCharts Team

Post #5863
Posted 4/23/2008 8:05:28 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/7/2008 1:18:33 PM
Posts: 8, Visits: 13
Thanks for the quick response.

Unfortunately, the cgi script that I am trying to call is located on a different server. I don't believe it's possible to use a relative url when I'm trying to access a different server...?

Any ideas/suggestions?

Thanks again.

Post #5890
Posted 4/23/2008 8:35:35 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 6:02:32 AM
Posts: 764, Visits: 1,215
Hi,

Could you please try using a relayer script (in the same domain as of the application file and chart swf) that loads the XML from the other domain and once loaded sets the XML to the chart?

Regards,

Sudipto Choudhury
FusionCharts Team

Post #5892
Posted 4/23/2008 10:46:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/7/2008 1:18:33 PM
Posts: 8, Visits: 13
I will give the relayer script a try. But, I guess my question now is - Why would the setDataURL function work for one gauge and not on a graph, when they're both on the same page and they both call from the same server?

Does the setDataURL function work differently for Fusion Charts than it does for Fusion Gadgets?

Thanks.

Post #5898
Posted 4/23/2008 1:13:19 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 6:02:32 AM
Posts: 764, Visits: 1,215
of chart that you are using does have it.

Regards,

Sudipto Choudhury
FusionCharts Team
Hi,

It is more probable that the version of FusionGadgets/FusionWidgets (v3.0.1 - December 26th, 2007 onwards) that you are using does not have this XSS attack prevention feature while the version (FusionCharts v3.0.5 - 22nd December, 2007 onwards)

Post #5900
Posted 4/23/2008 1:46:42 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/7/2008 1:18:33 PM
Posts: 8, Visits: 13
Hmmm... ok, well, can you possibly give me an example of the relay script that you mentioned? (Just a general idea of what you had in mind, or where I might find it). Thanks!
Post #5903
Posted 4/25/2008 8:51:06 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/7/2008 1:18:33 PM
Posts: 8, Visits: 13
Just bumping this thread in the hopes that I can get an example of a relay script.

Barring that, would it be possible to maybe get a copy of the older Fusion Charts engine (for lack of a better word) that would allow me to access a different server without a relay script? Or, could the "relative url" security feature possibly be made into an option that can be toggled on or off?

Thanks!

Post #5936
Posted 4/25/2008 3:34:16 PM
Supreme Being

Supreme Being