【问题标题】:ReferenceError: dhtmlXCellObject is not defined / TypeError: this._hdrInit is not a functionReferenceError: dhtmlXCellObject is not defined / TypeError: this._hdrInit is not a function
【发布时间】:2015-03-26 20:10:31
【问题描述】:

我有一张带有 google maps api 的地图和一张表格,我想用 dHTMLx Layout 将其连接到地图。 (我是初学者,很抱歉这个问题,但我还没有找到任何解决方案,我已经检查了代码中的引用)我有这个代码:

<head>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">

    <title>Map</title>
    <link rel="stylesheet" type="text/css" href="dhtmlxlayout_dhx_skyblue.css">
    <link rel="stylesheet" type="text/css" href="dhtmlxlayout.css">

    <script type="text/javascript" src="dhtmlxlayout.js"></script>
    <script type="text/javascript" src="dhtmlxcommon.js"></script>
    <script type="text/javascript" src="dhtmlxcontainer.js"></script>
    <script type="text/javascript" src="dhtmlxlayout_deprecated.js"></script>

</head> 

<body>

    <script>

        var dhxLayout = new dhtmlXLayoutObject(document.body, "2U");
        dhxLayout.cells("a").setText("Térkép"); 
        dhxLayout.cells("a").attachURL("googleapi.html");
        dhxLayout.cells("b").setText("Táblázat"); 
        dhxLayout.cells("b").setWidth(500); 
        dhxLayout.cells("b").attachURL("list.html");

    </script> 

</body> 

2 错误是什么意思? ReferenceError: dhtmlxCellObject is not defined & TypeError: this._hdrInit is not a function both in dhtmlxlayout.js 我应该纠正什么? googleapi.html 和 list.html 分别工作正常。

谢谢!

【问题讨论】:

    标签: typeerror dhtmlx referenceerror


    【解决方案1】:

    在 dhtmlx 布局中使用谷歌地图有一个特殊选项 - attachMap

    Online sample 和 Documentation 会帮助你

    顺便说一句,Google 不允许在 iframe 中使用其服务

    另外,如果您不使用已弃用的 dhtmlx 方法,则无需在页面中包含此文件

    【讨论】:

      猜你喜欢
      • 2015-01-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-17
      • 2012-06-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多