score:1

Accepted answer

i noticed this issue on ios devices. however there's a quite simple workaround. by default highcharts creates hidden <form> element and submits data to the exporting server. what we can do here is specifying form's target attribute.

so, here's a drop-in fix that overrides default highcharts exporting module (just put it after exporting.js)

highcharts.post = function (url, data) {
    var createelement = highcharts.createelement,
        discardelement = highcharts.discardelement,
        name,
        form;

    // create the form
    form = createelement('form', {
        method: 'post',
        action: url,
        enctype: 'multipart/form-data',
        target: '_blank'
    }, {
        display: 'none'
    }, document.body);

    // add the data
    for (name in data) {
        createelement('input', {
            type: 'hidden',
            name: name,
            value: data[name]
        }, null, form);
    }

    // submit
    form.submit();

    // clean up
    discardelement(form);
};

here you can find a working demo: http://jsfiddle.net/dwfv5/

score:1

since highcharts 3.0.8 (2014-01-09) you can set the target as an option, so you don't need the drop-in fix.

specify the target as part of the exporting.formattributes like so:

    exporting: {
        formattributes: {
            target: '_blank'
        }
    }

live demo at http://jsfiddle.net/highcharts/dwfv5/4/


Related Query

More Query from same tag