firefox谷歌geochart工具提示与基本标记错误

时间:2012-03-01 12:58:07

标签: google-visualization

我试图暗示这一点:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">   <head>      <base href="http://<?=$_SERVER['HTTP_HOST'];?>/" />     </head> </html> <body>  <script language="javascript" type="text/javascript" src="http://www.google.com/jsapi"></script>    <script type='text/javascript'>     google.load('visualization', '1', { 'packages': ['geochart'] });        var dataRows;       var mapOptions = {          colors: ['#FF6F28', '#FFD7C4'],             backgroundColor: {
                stroke: '#ffffff',
                strokeWidth: 0,
                fill: '#ffffff'             },          width: 500,             height: 312,            region: 'US',           resolution: 'provinces'         };      dataRows = [['UT',0],['Texas',1],['California',2],['New York',3]];

        function initGlobalMap()        {           var mapData = new google.visualization.DataTable();             mapData.addColumn('string', 'Region');          mapData.addColumn('number', 'ID');          mapData.addRows(dataRows);          var geochart = new google.visualization.GeoChart(document.getElementById('chart_geo2'));            google.visualization.events.addListener(geochart, 'select', function ()             {
                var selection = geochart.getSelection();
                var id = mapData.getValue(selection[0].row, 1);
                window.location = '/uploadedFiles/Code/GoogleGeoChartApi.aspx?id=' + id;            });             geochart.draw(mapData, mapOptions);         }       google.setOnLoadCallback(initGlobalMap);    </script>   <div id='chart_geo2'></div> </body>

使用firefox 10,无效工具提示。 问题是基本标记,如果我删除基本标记,它工作正常。 但我需要基本标签。

任何解决方案?

1 个答案:

答案 0 :(得分:1)

将图表放入没有基本标记的iframe。