anila Report post Posted October 13, 2009 Hi, Thanks alot for your reply and sample code. function download(feed,ctl){ alert('inside download...'); var form = document.forms[0]; form.method="POST"; form.action="ExtDXAction.do?type="+feed+"&cn="+ctl; form.submit(); } From js function i am forwarding request to one servlet. May be this is the prblm? not sure If I removed hilighted code from js. then its working perfect. Share this post Link to post Share on other sites
srividya_sharma Report post Posted October 13, 2009 Hi Anila, If you need to call the servlet, then , you can get rid of the javasript function and do something like this: // Encoding the URL since it has a parameter strDataURL = FusionChartsHelper.encodeDataURL("servlet.do?FactoryId="+factoryId,"false",response); then use this strDataURL in clickURL directly. Srividya Share this post Link to post Share on other sites
anila Report post Posted October 13, 2009 Hi, Can u explain me briefly. String chartXML1 = "<chart clickURL='javascript:download(%26apos;DwnNPS%26apos;,4);' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0'>"; String chartCatge1 ="<categories>"+str2; String chartCat1=str3; chartCatge1 = chartCatge1 +"</categories>"; String strXML1=chartXML1+chartCatge1+chartCat1+"</chart>"; System.out.println ("STRING XML :"+strXML1); //Create the chart - Column 3D Chart with data contained in strXML1 String chartCode1= createChart("design/js/FusionCharts/MSLine.swf","", strXML1,"nps2", 490, 200, false,true); I am rendering chart like this <div id="3" ><font face="GE Inspira" size="2" onclick="download('DwnNPS',4)" style="cursor:hand"><b><%=Block4_heading%></b></font> <%=chartCode1%> </div> i have the javascript function which i was posted before. Share this post Link to post Share on other sites
srividya_sharma Report post Posted October 13, 2009 Hi Anila, String strURL = FusionChartsHelper.encodeDataURL("ExtDXAction.do?type="+feed+"&cn="+ctl,"false",response); String chartXML1 = "<chart clickURL='"+strURL+"' ...>" Please try something like this. Srividya Share this post Link to post Share on other sites
anila Report post Posted October 14, 2009 (edited) Hi, String feed="DWNNPS"; int ctl=4; String strURL =encodeDataURL("ExtDXAction.do?type="+feed+"&cn="+ctl,"false",response); String chartXML1 = "<chart clickURL='"+strURL+"' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0'>"; String chartCatge1 ="<categories>"+str2; String chartCat1=str3; I tried to use somethng like above code. I am getting invalid xml data. Edited October 14, 2009 by Guest Share this post Link to post Share on other sites
srividya_sharma Report post Posted October 14, 2009 Hi Anila, Please attach the code. Thanks Srividya Share this post Link to post Share on other sites
anila Report post Posted October 15, 2009 (edited) Hi, here is the code String feed="DWNNPS"; int ctl=4; String strURL =encodeDataURL("ExtDXAction.do?type="+feed+"&cn="+ctl,"false",response); //clickURL='javascript:download(%26apos;DwnNPS%26apos;,4);' String chartXML1 = "<chart clickURL='"+strURL+"' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0'>"; String chartCatge1 ="<categories>"+str2; String chartCat1=str3; /*for(int head1=0;head1<nps1.size();head1++) { chartCatge1 = chartCatge1 + "<category label='"+nps1.get(head1)+"'/>"; }*/ chartCatge1 = chartCatge1 +"</categories>"; String strXML1=chartXML1+chartCatge1+chartCat1+"</chart>"; System.out.println ("STRING XML :"+strXML1); //Create the chart - Column 3D Chart with data contained in strXML1 String chartCode1= createChart("design/js/FusionCharts/MSLine.swf","", strXML1,"nps2", 490, 200, false,true); // System.out.println ("CHART CODE :"+chartCode1); Edited October 15, 2009 by Guest Share this post Link to post Share on other sites
anila Report post Posted October 15, 2009 (edited) Hi, I came to know one reason why it is showing INVALID XML DATA. tat is as part servlet request i used & after tat i replaced wth &. If i copy the code in IE xml is generating. For same code in FS,its throwing INVALID XML DATA. I am wondering,wats going wrong? Wat is the prblm? <chart clickURL='ExtDXAction.do?type=DWNNPS&cn=4' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0'><categories><category label='Jul-2008'/><category label='Aug-2008'/><category label='Sep-2008'/><category label='Oct-2008'/><category label='Nov-2008'/><category label='Dec-2008'/><category label='Mar-2009'/><category label='Jun-2009'/></categories><dataset seriesName='P-TECH'><set value='77.0'/><set value='64.0'/><set value='38.0'/><set value='81.0'/><set value='86.0'/><set value='80.0'/><set value='95.0'/><set value='69.0'/></dataset><dataset seriesName='LUNAR'><set value='100.0'/></dataset><dataset seriesName='CARDIAC'><set value='62.0'/><set value='78.0'/><set value='54.0'/><set value='68.0'/><set value='78.0'/><set value='69.0'/><set value='73.0'/><set value='61.0'/></dataset><dataset seriesName='MULTIVENDOR'><set value='63.0'/><set value='71.0'/><set value='44.0'/><set value='66.0'/><set value='79.0'/><set value='67.0'/><set value='80.0'/><set value='77.0'/></dataset><dataset seriesName='NETWORKING'><set value='46.0'/><set value='58.0'/><set value='57.0'/><set value='51.0'/><set value='77.0'/><set value='83.0'/><set value='78.0'/><set value='51.0'/></dataset><dataset seriesName='DU- IT'><set value='78.0'/><set value='78.0'/><set value='69.0'/><set value='80.0'/><set value='77.0'/><set value='83.0'/><set value='77.0'/><set value='84.0'/></dataset></chart> Edited October 15, 2009 by Guest Share this post Link to post Share on other sites
Guest Rajroop Report post Posted October 16, 2009 We are looking in to this. Thank you for your patience. Share this post Link to post Share on other sites
anila Report post Posted October 20, 2009 Hi, Thanks for your reply. Can you people help me on this ASAP is appreciated. Share this post Link to post Share on other sites
anila Report post Posted October 20, 2009 Hi All, Thanks alot for your guidelines. Finally i got solution for the problem. Insted of &,i used %26. Now its working. Rocking.....Thanks to all once again...... Share this post Link to post Share on other sites
srividya_sharma Report post Posted October 20, 2009 Hi Anila Happy to hear this. Glad to help! Srividya Share this post Link to post Share on other sites