Sign in to follow this  
Guest Madhumita

Passing Array in Data URL

Recommended Posts

Hi,

 

 

 

This seems like a simple task. I want to pass an array to the page that generates the graph, like so:

 

 

 

$array = serialize($options);

$strDataURL = encodeDataURL("searchgraph.php?player=0&club=$clubid&team=$team[b]&data=$array[/b]");

 

 

 

I can unserialse the array at the other end with no problems - the page is generating valid XML for the chart and yet the graph will not display with the following error:

 

ERROR: An error occurred while loading data. Please check your dataURL, by clicking on the "dataURL invoked" link above, to see if it's returing valid XML data. Common causes for error are:

 

No URL Encoding provided for querystrings in dataURL. If your dataURL contains querystrings as parameters, you'll need to URL Encode the same. e.g., Data.asp?id=101&subId=242 should be Data%2Easp%3Fid%3D101%26subId%3D242

 

Different sub-domain of chart .swf and dataURL. Both need to be same owing to sandbox security.

 

Network error

 

 

 

Clicking on the link displays totally valid chart XML. I've also tried urlencoding the serialised array with no luck.

 

 

 

I've had this before with a single array and ended up parsing the array into a comma separated string and passing that way but I don't want to do this now.

 

 

 

Any idea of what I'm doing wrong ?

 

 

 

Cheers

 

 

 

Steve

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

Could you please send us a live link of the URL and also send us the XML you are building in the $strDataURL as an XML file attachment?

Apologies for the inconvenience. Awaiting your reply.

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
Sign in to follow this