Sign in to follow this  
Rahul Kumar

Error in loading data...

Recommended Posts

Hi to all... I've a problem.

 

I've this javascript:

 


function updateCharts2(year, ms){	

	if (mssisfolChartLoaded){



		var strURL = "Data_prgXmssisfol.php?year=" + year + "&ms="" + ms + """ ;

		strURL = strURL + "&currTime=" + getTimeForURL();

		strURL = escape(strURL);	



		var chartObj = getChartFromId("n2");

		chartObj.setDataURL(strURL);



	}else{

		alert("Please wait for the charts to load6");

		return;

	}

 

 

 

If I print the strURL variable I've this result:

 


Data_prgXmssisfol.php%3Fyear%3D2006%26ms%3D%22INDUSTRIA%20ALIMENTARE%3A%22%26currTime%3D11_38_25_863

 

 

 

the same string with urldecode:

 


Data_prgXmssisfol.php?year=2006&ms="INDUSTRIA ALIMENTARE:"&currTime=11_38_25_863

 

 

 

The XML produced is in the attachment and seem to be correct, but the in the swf update (with id="n2") I receive the error "Error in loading data".

 

If I check the html source of page I found this javascript:

 




	//Instantiate the Chart	

	var chart_n2 = new FusionCharts("FusionCharts/Pie2D.swf", "n2", "700", "400", "0", "1");

	//Provide entire XML data using dataXML method

	chart_n2.setDataXML("Data_prgXmssisfol.php%3Fyear%3D2006%26ms%3D%22%22%26FCCurrTime%3D2008+07+40+11_44_40+AM")

	//Finally, render the chart.

	chart_n2.render("n2Div");



 

 

 

The variable ms appear without value... Why???

 

Thank you a lot!

 

 

 

Stefano

data_tmp.xml

Edited by Guest

Share this post


Link to post
Share on other sites

Hi!,

Could you please use

var strURL = "Data_prgXmssisfol.php?year=" + year + "&ms=" + ms ;

Insted of

var strURL = "Data_prgXmssisfol.php?year=" + year + "&ms="" + ms + """ ;

Please provide us the code for Data_prgXmssisfol.php so that we can help you in more details.

Edited by Guest

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