如果用户未登录,Google电子表格不会将数据返回到Google Chart

时间:2013-07-28 06:38:45

标签: internet-explorer google-chrome google-visualization google-sheets google-drive-api

My charts完全适用于Chrome和Firefox,但在IE10上有所突破。 IE10控制台报告以下错误:

  

SEC7112:来自https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheet/tq?key%3D0ArgBv2Jut0VxdERtWEU4UE5BbFd2TnZzVW8yTlB5eFE%26headers%3D1%26gid%3D0%26pub%3D1%26tq%3Dselect%2BL,%2BA,%2BH,%2BB,%2BI,%2BC,%2BF,%2BE,%2BG%2Bwhere%2BJ%2B%253D%2B的脚本... DreqId:0由于mime类型不匹配而被阻止   sgratrace.appspot.com

查询电子表格的代码:

Rats.Viz.GraduateEmploymentSurvey.Overview.query = function() {
    var query = new google.visualization.Query(
        Rats.Viz.GraduateEmploymentSurvey.Overview.dataSourceUrl);

    // Group by IHL and Post NS status
    // Pivot by year
    query.setQuery("select H, sum(D), sum(E) group by H pivot A " +
        "label sum(D) '', sum(E) '' " +
        "format sum(D) '$#,###', sum(E) '##.#%' ");

    query.send(Rats.Viz.GraduateEmploymentSurvey.Overview.dashboard);
};

此处的完整代码:https://github.com/seahrh/sgratrace/blob/master/war/js/rats.js

不幸的是IE10也拒绝与Google API Playground一起使用,所以我无法检查文档代码示例是否适用于IE10。

编辑:图表适用于IE9(版本9.0.8112.16421)但不适用于IE10(版本10.0.9200.16635)。

我认为图表工具可能会返回一个没有javascript MIME类型的javascript文件,这会让IE感到非常不舒服:IE9 script response blocked due to mime type mismatch

EDIT2

在此forum thread中找到有关此问题的更多信息。该错误似乎来自 Google Spreadsheet 而非Visualization API。 IE和Chrome强制用户在Google电子表格将数据返回到图表之前登录。请参阅使用Visualization API提交的#1281号凭证:https://code.google.com/p/google-visualization-api-issues/issues/detail?id=1281

0 个答案:

没有答案