Sign in to follow this  
danidin

Javascript Error When Exporting Chart In Server Side

Recommended Posts

Hello,

 

I'm trying to export a chart on the server side (Java) and I have a strange problem.

Everything is working as expected, except that after the export is almost complete, and the chart image is saved on the server, I get a JavaScript error:

invalid property id

:"null",width:900,height:300,DOMId:"ab...}))) ; } catch (e) { "<undefined/>"; }

This even happens when I try to export a chart using an example supplied in your website.

One thing worth mentioning - I'm using an export handler JSP that I wrote, based on the one supplied in the fusion charts kit.

The String that is being sent back by the JSP is:

&width=900&height=300&DOMId=abc&fileName=http://DOMAIN/PATH/TO/IMAGE/FusionCharts.jpg&notice=&statusCode=1&statusMessage=successful

so it looks good.

It seems that the value that is returned from the server upon the export completion is not valid.

 

I was not able to find the cause of this problem in the last 2 days, so I'd really appreciate and suggestions. I did see some people referring to identical or similar problems in the forum, but no solution was supplied.

 

Thanks in advance.

 

Dani

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum!smile.gif

 

Could you please send us a screenshot or any live link to look into the issue?

 

if possible, please send us the entire code to test it from our end.

 

Awaiting for your response.

Share this post


Link to post
Share on other sites

Thanks for the quick response.

 

Actually I figured it out by myself - the problem was that the JSP I wrote to handle the export request has import statements for other classes, and each import statement was in a separate line.

I guess that the white space of the new line was sent back to the output stream of the JSP and this caused the problem. If the response was trimmed on the client side before it was used the problem might have been prevented.

 

Dani

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Glad to know that you have managed to resolve your problem.

 

Happy FusionCharting!biggrin.gif

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