_javascript skills of solving fusioncharts linkage in Chinese garbled problem quickly

Source: Internet
Author: User

Question content:

When using Fusioncharts, you may want to click on a section of the chart such as demo.html, and then display the details of this section.

Fusioncharts has setdataxml,setdataurl these two methods are used to set the data. But there will be garbled problems (may appear in the Ajax situation), the specific use of children's shoes should understand.

Details are not specified in detail.

Treatment methods.

If you have AJAX-requested return content garbled, use Jquery.ajax directly.

Copy Code code as follows:

function Mychartclick (month) {
var id = 1;

var d = new Date ();
var strurl= ' xxxx '

Jquery.ajax ({
Type: "Get",
Url:strurl

Data:strurl,
Success:function (data) {
var chartobj = Getchartfromid ("myID");
Chartobj.setdataxml (data); Here directly with data to set the content of the myID can be.
}
});
}


The garbled is gone.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.