Sign in to follow this  
arvind.murugesan

Passing variable in the URL

Recommended Posts

Hi,

I am trying to pass a two variables to the clickURL parameter of the chart.And for some reason when i do that the chart is not rendered and i get a invalid xml format.But it works fine if i pass one variable.I want to know if it is possible to pass two variables on the clickURL attribute.

<chart clickURL='./fix_apps.php?type=orders_apps&orderdate=$orderdate'>

Share this post


Link to post
Share on other sites

I have a similar issue, using PHP and the FusionCharts js class. I create the chart with code like this:

 

var myChart = new FusionCharts("Charts/Gantt.swf", "myChartId", "1000", "100", "0", "0");

myChart.setDataURL("index_chart.php?id=1&subId=2");

 

But in chart.php, $_GET contains only id, not subId.

Share this post


Link to post
Share on other sites

Hi Jenny,

  Please use escapes for URL encode. It will solve your problem.

var myChart = new FusionCharts("Charts/Gantt.swf", "myChartId", "1000", "100", "0", "0");

// url encode

var strURL = escape("index_chart.php?id=1&subId=2");

myChart.setDataURL(strURL);

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