我最近继承了一个以各种方式拙劣的网站。我更像是一个 php 人,最初 js 工作得很好。我没有对 javascript 或任何包含文件进行任何更改,但在进行了一些内容编辑后,我收到了来自 firebug 的错误。
a.dispatchEvent is not a function
emptyFunction()protot...ects.js (line 2)
emptyFunction()protot...ects.js (line 2)
fireContentLoadedEvent()protot...ects.js (line 2)
[Break on this error] var Prototype={Version:'1.6.0.2',Brows...pe,Enumerable);Element.addMethods();
protot...ects.js (line 2)
this.m_eTarget.setStyle is not a function
[Break on this error] this.m_eTarget.setStyle( { position: 'relative', overflow:'hidden'} );
protot...ects.js (line 43)
uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: js/prototype_effects.js :: anonymous :: line 2" data: no]
谷歌搜索我发现一些帖子有时 jquery+prototype 不能很好地播放,重新排列脚本可以解决这个问题,但是由于我没有触及这些部分,我不确定我什至需要从哪里开始调试。以前的开发人员合并了一个 head.inc 文件,该文件加载原型,scriptaculous,然后许多页面在一个子模板中加载 jquery 用于灯箱等功能。
该站点临时位于http://dawn.mikeyhill.com
任何帮助表示赞赏。