bbn

an absolute dataURL?

Recommended Posts

Is it possible to have Fusioncharts load XML data from an absolute URL rather than a URL rooted at the same server?

 

 

 

In other words, let's imagine that the page requested by the user is http://AAA.com/chart . With a fusionchart embedded on that page is it possible to have the swf pull the data from a different server with a param like flashVars="&dataURL=http://BBB.com/theXMLData" ?

 

 

 

 

 

Ben

Share this post


Link to post
Share on other sites

Okay, I've figured out how to use the debugMode and the following probably answers my question: "Different sub-domain of chart .swf and dataURL. Both need to be same owing to sandbox security."

 

 

 

 

 

Here is my situation: I am running an application on Facebook. Facebook mediates all requests to my server through their pages. In other words, user requests go to Facebook, Facebook adds params and sends the request to me, I send the response back to Facebook, Facebook alters the response and presents it to the user.

 

 

 

So what happens is that the FusionChart SWF file thinks that the domain of the SWF is http://apps.facebook.com. So I can't tell it to load the XML data from somewhere like http://mainsocial.com/xmlData . I can tell it to load the XML data from somewhere like apps.facebook.com/myApp/xmlData, but Facebook returns errors because it doesn't know what to do with the returned XML.

 

 

 

Is there any way around this?

 

 

 

Ben

Share this post


Link to post
Share on other sites

Ben,

 

 

 

If you're hosting the SWF on your server and calling it in a facebook app, the domain of the SWF is your page (and not facebook). As such, if the SWF and XML file are both on your domain (and same sub-domain), it won't be a problem.

Share this post


Link to post
Share on other sites

Hi Pallav,

 

 

 

If you're hosting the SWF on your server and calling it in a facebook app, the domain of the SWF is your page (and not facebook). As such, if the SWF and XML file are both on your domain (and same sub-domain), it won't be a problem.

 

 

 

 

 

Afraid you're wrong. Facebook caches the SWF file and loads it from their own servers. If I put a domain such as "/controller/XMLdata" in the dataURL param, the debug window tells me that the flash file is trying to load "http://apps.facebook.com/controller/XMLdata" instead of "http://my_domain.com/controller/XMLdata".

 

 

 

I think I explained that all in my messages above.

 

 

 

Ben

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now