Sign in to follow this  
Guest Madhumita

Javascript link with UTF-8 characters

Recommended Posts

We are in the middle of evaluating FusionCharts as a replacement for OpenFlashChart. Unfortunately, we have problems with multilingual characters in javascript links for drill down charts.

 

 

 

UTF-8 characters are printed fine in the chart itself, but the browser receives wrong characters in the javascript call. We tried both options, the awkward "j-" and the classical "javascript:" notation. In the first case, both Firefox and IE receive the UTF8 multibyte characters wrongly, in the latter case, only IE has those problems.

 

 

 

[set link="j-chart_popup-blö" ...]

 

[set link="javascript:chart_popup('blö')" ...]

 

(for some reason, the ifcode for code didn't work)

 

 

 

Even tried the BOM mark with no change. The HTML document has UTF-8 encoding and it worked fine in OpenFlashChart. Any ideas?

 

 

 

Steffen

Share this post


Link to post
Share on other sites
Can you please try [chart unescapeLinks='0' ...] once?

 

 

 

That helped. I needed to go with the j- notation, though. It didn't work with javascript: in Firefox. Thus, I also needed to escape any dashes in the arguments to the javascript function, which is rather ugly.

 

 

 

Thanks,

 

Steffen

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello xiaokui,

 

Can you please elaborate on the issue you are facing?

 

Apologies for the inconvenience.

Share this post


Link to post
Share on other sites

It becomes some garbled characters on calling a javascript function added in the "set" in the xml.I use type of Gantt in fusionWidgets.

set [chart unescapeLinks='0' ...] ,only working on fusionCharts ,it still does not work on Gantt .Any help is appreciated.

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Could you please try it using the latest version of SWFs of FusionWidgets(V3.1.1)?

However if it still does not work could you please send us the Generated XML codes that you are using as an attachment so that we might look into it?

Awaitng your reply. :hehe:

Share this post


Link to post
Share on other sites

I just downloaded the fusionwidgets from the home page.it does not support the JavaScript function preceded by "j-" .And the problem is still not resolved.if i click the link,it gives me a javascript error:

row:1,char:8,error:Unterminated string constant...

The XML i use is in the attachment.

Gantt1.xml

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

We are sending you a sample using your XML codes, please have a look.

However, please confirm the followings while defining a link with special charecters:-

1)Please enable the 'registerWithJS'.

2)Please save the file with UTF8 encoded form.

Ref:-http://www.fusioncharts.com/forum/FindPost8054.aspx

Hope this helps. :)

gantt chart.zip

Share this post


Link to post
Share on other sites

I try the sample,the problem remain .... :)

when I click the link,it gives me a javascript error:

row:1,char:8,error:Unterminated string constant,code:0...

and I have tried it on someone else's computer,the results is just the same.

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Could you please replace "console.log(p);" with "alert(p);" in the HTML page.

Ref:-<script language="JavaScript">

function myJs(p) {

 alert(p);

}

 </script>

Hope this helps. :)

Share this post


Link to post
Share on other sites
Guest Madhumita

Hi,

Would you please consider using the code below and see if it works?

 <SCRIPT LANGUAGE="JavaScript">

<!--

 function myJS(myVar){

window.alert(myVar);

 }

//-->

</SCRIPT>

Awaiting your reply. :)

Share this post


Link to post
Share on other sites

It doesn't work.I use IE7,the fusioncharts work fine if I set "unescapeLinks=0"

the sample give me a javascript error even if I delete the javascript function myJs in the html.

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