anila Report post Posted September 10, 2009 Hi, I used like this in my jsp. <chart labelDisplay='Rotate' slantLabels='1' connectNullData='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0' clickURL='download('DwnNPS',2)'> by puting javascript function in head tag in same page. <script language="javascript"> function download(feed,ctl){ var form = document.forms[0]; form.method="POST"; form.action="ExtDXAction.do?type="+feed+"&cn="+ctl; form.submit(); } </script> it is showing invalid xml data. If i remove the single quote,its not throwing exception. but i have to pass the string to call the js function. may i know where i did the mistake. is it possible to call external js file. Share this post Link to post Share on other sites
saptarshi Report post Posted September 10, 2009 Hello Anila, Could you please try using the following syntax to specify the JS link? clickURL="j-download('DwnNPS',2)" Hope this helps. Share this post Link to post Share on other sites
anila Report post Posted September 11, 2009 Hi, still it is showing invalid xml data. Wat I have to do????? Share this post Link to post Share on other sites
saptarshi Report post Posted September 11, 2009 Hi, Please post your XML and the JS as an attachment so that we may take a look at what is going wrong. Waiting for your reply. Share this post Link to post Share on other sites
anila Report post Posted September 15, 2009 Hi, here is my xml file. <chart caption='Trend By Region-USA' baseFont='Ge Inspira' legendPosition='RIGHT' clickURL='j-download('DwnNPS',2)' 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='Central Corridor'><set value='67.0'/><set value='80.0'/><set value='45.0'/><set value='75.0'/><set value='64.0'/><set value='65.0'/><set value='80.0'/><set value='73.0'/></dataset><dataset seriesName='West'><set value='65.0'/><set value='61.0'/><set value='45.0'/><set value='62.0'/><set value='77.0'/><set value='77.0'/><set value='79.0'/><set value='52.0'/></dataset><dataset seriesName='Ultrasound HQ'><set value='100.0'/></dataset><dataset seriesName='North East'><set value='77.0'/><set value='77.0'/><set value='55.0'/><set value='62.0'/><set value='76.0'/><set value='73.0'/><set value='78.0'/><set value='77.0'/></dataset><dataset seriesName='Central Atlantic'><set value='86.0'/><set value='76.0'/><set value='54.0'/><set value='74.0'/><set value='88.0'/><set value='78.0'/><set value='80.0'/><set value='69.0'/></dataset><dataset seriesName='South East'><set value='65.0'/><set value='75.0'/><set value='72.0'/><set value='87.0'/><set value='85.0'/><set value='84.0'/><set value='76.0'/><set value='81.0'/></dataset></chart> Script function is <script language="javascript"> function download(feed,ctl){ var form = document.forms[0]; form.method="POST"; form.action="ExtDXAction.do?type="+feed+"&cn="+ctl; form.submit(); } Shall i place ths script as part of external script file? Let me know what is going wrong. Waiting for ur reply.......... Share this post Link to post Share on other sites
anila Report post Posted September 17, 2009 Hi, Please Any body help on this to me. this is very urgent. Share this post Link to post Share on other sites
Guest Madhumita Report post Posted September 17, 2009 Hi Anila, Can you please consider changing clickURL='j-download('DwnNPS',2) to the following? clickURL='j-download-DwnNPS-2' Hope this helps. Share this post Link to post Share on other sites
anila Report post Posted September 17, 2009 Hi, It is showing Http status-404 error. Share this post Link to post Share on other sites
Guest Madhumita Report post Posted September 17, 2009 Hi Anila, The error occurring might be because of the DwnNPS function. Can you please send us the code for the DwnNPS , so that we can possibly find a solution. Awaiting your reply. Share this post Link to post Share on other sites
anila Report post Posted September 18, 2009 Hi, DwnNPS is not a function. It is just string whch is passed to download(feed,ctl) js function. Share this post Link to post Share on other sites
srividya_sharma Report post Posted September 19, 2009 (edited) Hi Please try with a simple alert statement in the javascript download function. alert('Feed='+feed); Let us see if that works. Srividya Edited September 19, 2009 by Guest Share this post Link to post Share on other sites
anila Report post Posted September 29, 2009 Hi, can anybody help me on this issue plz.... Share this post Link to post Share on other sites
FusionCharts Support Report post Posted September 29, 2009 Hi, Could you please try one of the following? Java Scrip t:download('DwnNPS',2) or j-download-DwnNPS,2 [ Here the function download will get one parameter string "DwnNPS,2" which you need to split into to in the function itself.] Share this post Link to post Share on other sites
anila Report post Posted October 7, 2009 Hi Sudipto Choudhury, Thanks for your reply. <chart labelDisplay='Rotate' slantLabels='1' clickURL=JavaScript:download('DwnNPS',2) baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0' > I was calling js function as part chart tag as shown above. It is throwing javascript error like:Expected ')' May i know wats wrong about this. Thanks in advance. Smiles, Anitha G Share this post Link to post Share on other sites
FusionCharts Support Report post Posted October 7, 2009 Hi, I find in your XML: clickURL=download('DwnNPS',2) This is not a valid XML attribute. You need to use single/double quote around the values. clickURL="download('DwnNPS',2);" This would help. Make sure that you are using DataURL method. If you are using dataXML method please use: clickURL='download(%26apos;DwnNPS%26apos;,2);' Share this post Link to post Share on other sites
anila Report post Posted October 8, 2009 Hi, by using like this clickURL='download(%26apos;DwnNPS%26apos;,2);' ,it will work similar like js function onclick? I tried this one also it is redirecting http://localhost:8084/project_Testing_FS/download('DwnNPS',4); like this. type Status report message /project_Testing_FS/download('DwnNPS',4); description The requested resource (/project_Testing_FS/download('DwnNPS',4) is not available. wat else i have to do here? Any thing wrong i did??? Share this post Link to post Share on other sites
srividya_sharma Report post Posted October 8, 2009 Hi Anila, Can you please provide the piece of code where you are constructing the xml. Say, String chartXML="<chart>..." I will try to modify it and send. Share this post Link to post Share on other sites
anila Report post Posted October 9, 2009 Hi, Thanks for your reply. Here is the code String chartXML1 = "<chart connectNullData='1' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0' clickURL='download(%26apos;DwnNPS%26apos;,4);'>"; Share this post Link to post Share on other sites
srividya_sharma Report post Posted October 9, 2009 Hi Anila, Please change that statement with: String chartXML1 = "<chart connectNullData='1' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0' clickURL='download(%26apos;DwnNPS%26apos;,4);'>"; Hope this works! Share this post Link to post Share on other sites
anila Report post Posted October 12, 2009 Hi, Thanks for your reply. After replacing with your statement also,it did n't worked. I am wondering wat is the difference between yours statement and mine. Same error i am getting in IE. Share this post Link to post Share on other sites
srividya_sharma Report post Posted October 12, 2009 (edited) I think there was a mistake, please prepend to the function call Java script: . without the space. It worked for me with that. Edited October 12, 2009 by Guest Share this post Link to post Share on other sites
Rahul Kumar Report post Posted October 12, 2009 (edited) Hi Anila 2nd Method: Please use the following code and try again? String chartXML1 = "<CHART clickURL='j-download-DwnNPS,4' showvalues='0' shownames='1' legendBorderAlpha='0' yAxisName='NPS' legendPosition='RIGHT' useRoundEdges='1' baseFont='Ge Inspira' slantLabels='1' labelDisplay='Rotate' connectNullData='1'>"; and later in you JavaScript, you would need to split the parameter using delimiter as , (comma). Also please make sure that you have set registerWithJS parameter to true. Edited October 12, 2009 by Guest Share this post Link to post Share on other sites
anila Report post Posted October 13, 2009 Hi srividya_sharma, By doing like that also,I am getting the same problem. Let me know whats the issue exactly? Can you share the code,whch is working for you. Share this post Link to post Share on other sites
anila Report post Posted October 13, 2009 Hi Rahul, It is throwing javascript error:unterminated string constant. String chartXML1 = "<chart clickURL='j-download-DwnNPS,4' labelDisplay='Rotate' slantLabels='1' baseFont='Ge Inspira' useRoundEdges='1' legendPosition='RIGHT' yAxisName='NPS' legendBorderAlpha='0' shownames='1' showvalues='0'>"; Let me know wats wrong going here.... Share this post Link to post Share on other sites
Rahul Kumar Report post Posted October 13, 2009 Hi Anila, Could you please post your code for your JS function 'download' ? Also please attached the HTML Generated code of your JSP page (by going to View Source of the page). Share this post Link to post Share on other sites
srividya_sharma Report post Posted October 13, 2009 Hi Anila, Here is the code. Please modify the path to js, FusionChartsRenderer.jsp and swf file before trying. Hope this really helps. LinkExample.zip Share this post Link to post Share on other sites
anila Report post Posted October 13, 2009 Hi Rahul, it is throwing HTTP Status 404 - /project_Testing_FS/j-download-DwnNPS,4 type Status report message /project_Testing_FS/j-download-DwnNPS,4 description The requested resource (/project_Testing_FS/j-download-DwnNPS,4) is not available. Apache Tomcat/5.5.9 Share this post Link to post Share on other sites
Rahul Kumar Report post Posted October 13, 2009 Hi Anila, Could you please make sure that you are using the updated version of charts? The J- feature is supported in version 3.0.7 and later. Share this post Link to post Share on other sites
anila Report post Posted October 13, 2009 Hi Srividya, hey your function is working,but its working only first time click. what is the problem,usually it will work like this only... Share this post Link to post Share on other sites
srividya_sharma Report post Posted October 13, 2009 Hi Anila, Good that it is working. Please send me the screen-shot showing what is happening the second time you click. Thanks Srividya Share this post Link to post Share on other sites