当通过AJAX调用页面时,在IE中破解的Highcharts - 使用jQuery的异常

时间:2013-02-25 16:35:13

标签: internet-explorer jquery highcharts highstock

我似乎遇到了IE的问题,它通过AJAX加载页面。我们使用jQuery,Bootstrap,Select2和Highcharts并且不确定它是否是由Select2 ajax调用引起的问题,但是无结果代码似乎与AJAX返回一样好。 我得到一个jQuery Exception,当没有highcharts它似乎很好,所以我不知道问题在哪里...

http://jsfiddle.net/koconder/2aXem/5/

$(document).ready(function () {
    $('#country').select2();
    $('#keyword').select2();
    $('#device').select2();

    //$('#keyword').select2('val', 'NULL').select2('disable');
    //$('#device').select2('val', 'NULL').select2('disable');

    $('#app').select2({
        minimumInputLength: 0,
        placeholder: {
            title: "Select your app...",
            id: ""
        },
        ajax: {
            url: 'http://dev.adtrafik.com/static/t/ajax.php',
            dataType: 'json',
            data: function (term, page) {
                return {
                    term: term, // search term
                    page_limit: 10,
                };
            },
            results: function (data) {
                return {
                    results: data
                };
            }

        },
        initSelection: function (element, callback) {
            return $.getJSON('http://dev.adtrafik.com/static/t/ajax/select2_sample.php?post=3&id=' + (element.val()), null, function (data) {
                return callback(data);
            });
        }
    });
    $('#app').select2('data', {
        id: '48',
        text: 'Free Poker by PokerStars'
    })//.select2('disable')

    $('#country').change(function () {
        var id = $('#country').val();
        var dataString = 'post=1&id1=' + id;

        $.ajax({
            type: 'GET',
            url: 'http://dev.adtrafik.com/static/t/ajax.php',
            data: dataString,
            cache: false,
            success: function (html) {
                //$('#device').select2('enable');
                $('#device').html(html);
                $('#keyword').html('');
            }
        });
    });
    $('#device').change(function () {
        var id = $('#country').val();
        var id2 = $('#device').val();
        var dataString = 'post=2&id1=' + id + '&id2=' + id2;

        $.ajax({
            type: 'GET',
            url: 'http://dev.adtrafik.com/static/t/ajax.php',
            data: dataString,
            cache: false,
            success: function (html) {
                //$('#keyword').select2('enable');
                $('#keyword').html(html);
            }
        });
    });
    $('#keyword').change(function () {
       // $('#app').select2('enable');
    });
    $('#go').click(function (event) {
        var id = $('#country').val();
        var id2 = $('#device').val();
        var id3 = $('#keyword').val();
        var id4 = $('#app').val();
        var dataString = 'post=4&regionid=' + id + '&engineid=' + id2 + '&kwid=' + id3 + '&appid=' + id4;

        $.ajax({
            type: 'GET',
            url: 'http://dev.adtrafik.com/static/t/ajax.php',
            data: dataString,
            cache: false,
            success: function (html) {
                $('#chart').fadeOut(function () {
                    $('#chart').html(html).fadeIn();
                });
            }
        });
        event.preventDefault();
    });
});

它说jQuery和Series Options的一些问题是for null,这是真的,我尽力通过IE调试(painnfull !!!)

我无法通过jFiddle加载相同的AJAX,但代码在那里...... 我很乐意支付一些鱿鱼的帮助:)。

文森特

1 个答案:

答案 0 :(得分:0)

https://github.com/highslide-software/highcharts.com/issues/514

发现问题,IE错误结束','在数据系列和变量中。