satishssrc Report post Posted September 27, 2010 Hey all, I am using the data url method of fusion charts to drill down into my chart. It has been working for the following: $strlink =urlencode("javaScript:updateProductChart1(".$ors['year2007'].",".$daterange1.",".$date.",".$RegionNumber.",".$Category.");"); in this code all parameters I am sending are numerical values. But I want to send a string for eg: $var = "this is test"; $strlink =urlencode("javaScript:updateProductChart1(".$ors['year2007'].",".$daterange1.",".$date.",".$RegionNumber.",".$Category.",".$var.");"); can you tell me how to this. My java script function updateProductChart1 is not invoked if I have a string being sent. I need your help guys!!! thank you, satish Share this post Link to post Share on other sites
FusionCharts Support Report post Posted September 27, 2010 Hi, please enclose the string with HTML encoded form of single or double quotes. Please enclose the string with ' or " Share this post Link to post Share on other sites
satishssrc Report post Posted September 27, 2010 Hi, please enclose the string with HTML encoded form of single or double quotes. Please enclose the string with ' or " Share this post Link to post Share on other sites
satishssrc Report post Posted September 27, 2010 Hi Sudipto Choudhury, Is this what you meant. $strlink =urlencode("javaScript:updateProductChart1(".$ors['year2007'].",".$daterange1." ,".$date.",".$RegionNumber.",".$Category.","&"$var"&");" ); thanks, satish Share this post Link to post Share on other sites
FusionCharts Support Report post Posted September 27, 2010 Hi Satish, A bit different: $strlink =("javaScript:updateProductChart1(".$ors['year2007'].",".$daterange1." ,".$date.",".$RegionNumber.",".$Category.", '".$var."');" ); You do not need to URLEncode if you are using FusionCharts v3.2. In case you are using version earlier to v3.2 and you are using dataXML method, you need to use URLEncode. Share this post Link to post Share on other sites
satishssrc Report post Posted September 28, 2010 Hi Satish, A bit different: $strlink =("javaScript:updateProductChart1(".$ors['year2007'].",".$daterange1." ,".$date.",".$RegionNumber.",".$Category.", '".$var."');" ); You do not need to URLEncode if you are using FusionCharts v3.2. In case you are using version earlier to v3.2 and you are using dataXML method, you need to use URLEncode. Share this post Link to post Share on other sites
satishssrc Report post Posted September 28, 2010 Hey Sudipto , I am not sure what you mean by $strlink =("javaScript:updateProductChart1(".$ors['year2007'].",".$daterange1." ,".$date.",".$RegionNumber.",".$Category.", '".$var."');" ); what is ''' and ""' you want me to directly key it in the link and call the $strlink in the addChartdata(array,$strlink) ? It gives me an Invalid XML and my chart is not generated to drill down... What should I do? Thanks, satish Share this post Link to post Share on other sites
satishssrc Report post Posted September 28, 2010 Hey Sudipto , I am not sure what you mean by $strlink =("javaScript:updateProductChart1(".$ors['year2007'].",".$daterange1." ,".$date.",".$RegionNumber.",".$Category.", '".$var."');" ); what is ''' and ""' you want me to directly key it in the link and call the $strlink in the addChartdata(array,$strlink) ? It gives me an Invalid XML and my chart is not generated to drill down... What should I do? Thanks, satish Share this post Link to post Share on other sites
satishssrc Report post Posted September 28, 2010 Hey Sudipto, I am sorry it is working really great.!!!! it was my bad made some silly mistake(as usual ). Thanks for the quick help. satish Share this post Link to post Share on other sites
satishssrc Report post Posted September 28, 2010 (edited) Hey all, K now how do i send a variable that has something like $var = C-24. I tried to do the same as before but no luck.. Please let me know this. thanks, satish Edited September 28, 2010 by satishssrc Share this post Link to post Share on other sites
Rohit Kumar Report post Posted September 29, 2010 Hi Satish, If you want to send C-24 as a string you have to put it inside quotation $var = "C-24"; and than send it to the function. Hey all, K now how do i send a variable that has something like $var = C-24. I tried to do the same as before but no luck.. Please let me know this. thanks, satish Share this post Link to post Share on other sites
satishssrc Report post Posted September 30, 2010 Hey all, Well the ' $var ' seems to be working if I have $ var = "this is test"; but wont work if i have $var = "C-24"; Any clue?? Thanks, satish Share this post Link to post Share on other sites
satishssrc Report post Posted October 1, 2010 Hey all, Well I am not able to figure out where I am going wrong $strlink =("javaScript:updateProductChart1(".$ors['year2007'].",".$daterange1." ,".$date.",".$RegionNumber.",".$Category.", '".$var."');" ); seems to be working $var ="this is test"; but wont work if my $var changes to $var = "C-24"; I don't know why? The value in $var keeps changing depending on the option selected by the user. Please help...I need it real quick.. Thanks satish Share this post Link to post Share on other sites