HasData中来自JSONParse的神秘jQuery错误

时间:2013-08-27 20:34:16

标签: javascript jquery json undefined

当我尝试使用jQuery运行Web应用程序时,我遇到了一组奇怪的错误。无处不在,我得到'e is undefined'和'JSON.parse:意外的角色'。我恐怕我不知道这些存在的位置和原因 - 以前有人见过/处理过这个问题吗?它似乎与某些元素混合起来是.bound()或给定的.on()动作。当我从选择菜单中进行聚焦时,意外的角色似乎就在身边。

Firebug堆栈跟踪:

TypeError: e is undefined
hasData(e=undefined)jquery...0130612 (line 5)
hasData(e=[Object[div.tooltip]], t=undefined, n=false, r=Object[qp { gm_accessors_={...}, __gm_id=530, gm_bindings_={...}, more...}])jquery...0130612 (line 5)
hasData(e=[Object[div.tooltip]], t=function(), n=undefined)jquery...0130612 (line 5)
hasData()jquery...0130612 (line 5)
hasData(e=Object[qp { gm_accessors_={...}, __gm_id=530, gm_bindings_={...}, more...}])jquery...0130612 (line 5)
show()bootst...0130521 (line 141)
tooltip()bootst...0130521 (line 334)
x(e=Object[qp { gm_accessors_={...}, __gm_id=530, gm_bindings_={...}, more...}], t=function(), n=undefined)jquery...0130612 (line 4)
x(e=function(), t=undefined)jquery...0130612 (line 4)
tooltip(option="show")bootst...0130521 (line 329)
mapperFunctions_proximityCheck(isForSale=true)mapper...ions.js (line 579)
(?)()routeMapper.js (line 27)
trigger(a=$g { gm_accessors_={...}, map=mp, gm_bindings_={...}, more...}, b="directions_changed", c=undefined)main.js (line 23)
sg(a=$g { gm_accessors_={...}, map=mp, gm_bindings_={...}, more...}, b="directions")main.js (line 29)
dd(a="directions", b=Object { routes=[1], status="OK", Vb={...}})main.js (line 28)
bindTo(c=Object { routes=[1], status="OK", Vb={...}})main.js (line 30)
(?)(result=Object { routes=[1], status="OK", Vb={...}}, status="OK")routeMapper.js (line 150)
mapMaker_changed(a=1)1 (line 37)
nA(d=function())1 (line 22)
mapMaker_changed()1 (line 37)
(?)(b=Object { routes=[1], status="OK", Vb={...}}, c="OK")5 (line 8)
(?)(b=Object { routes=[1], status="OK", Vb={...}})5 (line 5)
dB(a=Object { routes=[1], status="OK", Vb={...}})1 (line 33)
DirectionsService.Route?4b0&5m2&1m1&2sCedarville%20University%2C%20Cedarville%2C%20OH&5m2&1m1&2s37659&6e0&12sen-US&100b0&102b0&callback=_xdc_._3i4ew&token=97219()Direct...n=97219 (line 450)


...s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!=...

3
jquery...0130612 (line 5)
SyntaxError: JSON.parse: unexpected character
x(n=undefined)jquery...0130612 (line 4)
attachValidation(c=Object[span.input-validation-error], d=Object[select#Type])jquery....min.js (line 5)
x()jquery...0130612 (line 4)
customMetaMessage(element=select#Type, message=undefined)jquery....min.js (line 16)
customMetaMessage()jquery....min.js (line 16)
validate(errors=undefined)jquery....min.js (line 15)
validate(element=select#Type)jquery....min.js (line 15)
validate(element=select#Type)jquery....min.js (line 15)
validate(event=Object { type="focusout", timeStamp=0, jQuery11010036435891111683105=true, more...})jquery....min.js (line 15)
customMetaMessage(event=Object { type="focusout", timeStamp=0, jQuery11010036435891111683105=true, more...})jquery....min.js (line 16)
hasData(e=Object { type="focusout", timeStamp=0, jQuery11010036435891111683105=true, more...})jquery...0130612 (line 5)
hasData(e=Object { type="focusout", timeStamp=0, jQuery11010036435891111683105=true, more...})jquery...0130612 (line 5)
hasData(n=Object { type="focusout", timeStamp=0, jQuery11010036435891111683105=true, more...}, r=[Object { type="focusout", timeStamp=0, jQuery11010036435891111683105=true, more...}], i=select#Type, o=undefined)jquery...0130612 (line 5)
hasData(e="focusout", t=select#Type, n=Object { originalEvent=Event blur, type="blur", timeStamp=0, more...}, r=true)jquery...0130612 (line 5)
hasData(e=blur )jquery...0130612 (line 5)


...nectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t...

1 个答案:

答案 0 :(得分:0)

至少对于JSON.parse错误,我发现对象的名称/ id =“Type”是有问题的;只需更改为“AdType”之类的内容即可使用。我不知道这是否会切入问题的根源,但我认为它有效。