ktsha Report post Posted March 17, 2009 (edited) Dear All, I got a doubt,Please clear it. This is the current Code below code is in XML LinkStr = "' link='javaScript:updateChart( "" + FuncName + "","" + (String) map.get("status_name") + "","" + DrillDownKPI + "")' />"; and this is the updateChart javascript function (XMLchart.js) function updateChart(Mngmnt,stutus,kpi,serviceID) { var strURL = "ChartServlet?GM=" + Mngmnt + "&status=" +stutus + "&kpi=" +kpi; strURL = escape(strURL); var chart_CityDetails = new FusionCharts('FusionCharts/StackedBar3D.swf?ChartNoDataText=Click right chart to view Services Details', 'ServDetails', '550', '450', '0', '1'); chart_CityDetails.setDataURL(strURL); chart_CityDetails.render(Mngmnt+kpi+"ServDetailsDiv"); } I want to pass a new parameter 'condQuery ' query with the link in XML i tried this LinkStr = "' link='javaScript:updateFusionChart( "" + condQuery + "","" + FuncName + "","" + (String) map.get("status_name") + "","" + DrillDownKPI + "")' />"; and updated javascript function as function updateChart (condQuery,Mngmnt,stutus,kpi,serviceID){ var strURL = "ChartServlet?GM=" + Mngmnt + "&status=" +stutus + "&kpi=" +kpi+ "&condQuery=" +condQuery; strURL = escape(strURL); var chart_CityDetails = new FusionCharts('FusionCharts/StackedBar3D.swf?ChartNoDataText=Click right chart to view Services Details', 'ServDetails', '550', '450', '0', '1'); chart_CityDetails.setDataURL(strURL); chart_CityDetails.render(Mngmnt+kpi+"ServDetailsDiv"); } But after execution it was showing as Invalid XML Data. Is there any problem with the parameter passing ?? Any help will be appreciated... Edited March 17, 2009 by Guest Share this post Link to post Share on other sites
ktsha Report post Posted March 17, 2009 Any one please help as it is very urgent to complete the sceduled work Share this post Link to post Share on other sites
ktsha Report post Posted March 18, 2009 The problem is Solved. It was because of HTML Encoding problem . Use the below method public static String HTMLEntityEncode( String s ) { StringBuffer buf = new StringBuffer(); int len = (s == null ? -1 : s.length()); for ( int i = 0; i < len; i++ ) { char c = s.charAt( i ); if ( c>='a' && c<='z' || c>='A' && c<='Z' || c>='0' && c<='9' ) { buf.append( c ); } else { buf.append( "" + (int)c + ";" ); } } return buf.toString(); } or URLEcnoder class.There we have an encode method which will do the same Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted November 16, 2009 Hi, Thank you for sharing your ideas. Happy FusionCharting. Share this post Link to post Share on other sites