最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - prototype : registry is undefined - Stack Overflow

programmeradmin2浏览0评论

I have registry is undefined row: 5557...with prototype 1.7.


$$('#pageNav a').each(function(element) {
    element.observe('click', doSome(this.href));
})

pageNav is a UL list with LI and A tags.

I have registry is undefined row: 5557...with prototype 1.7.


$$('#pageNav a').each(function(element) {
    element.observe('click', doSome(this.href));
})

pageNav is a UL list with LI and A tags.

Share Improve this question edited Dec 29, 2011 at 15:52 Rob W 349k87 gold badges807 silver badges682 bronze badges asked Dec 13, 2010 at 21:01 SteSte 1,5208 gold badges33 silver badges63 bronze badges 1
  • Maybe unrelated, but what is this referring to? Try element.href. – giraff Commented Dec 18, 2010 at 11:05
Add a ment  | 

1 Answer 1

Reset to default 7

This may not apply exactly, but I had a very similar problem. Turned out the object I was trying to attach an event handler to was undefined.

// objTbl is undefined -> 'registry is undefined' error
Event.observe(objTbl.rows[i], 'mousedown', getClick);error

I'm guessing this type of error will usually e back to the object or the handling function being undefined.

发布评论

评论列表(0)

  1. 暂无评论