{"id":156,"date":"2007-07-09T01:53:45","date_gmt":"2007-07-08T17:53:45","guid":{"rendered":"http:\/\/wp.jiinjoo.com\/?p=156"},"modified":"2007-07-23T22:49:02","modified_gmt":"2007-07-23T14:49:02","slug":"eventobserve-is-not-a-function-resolved","status":"publish","type":"post","link":"https:\/\/wp.jiinjoo.com\/?p=156","title":{"rendered":"Event.observe is not a function &#8211; Resolved!"},"content":{"rendered":"<p>Sacrifice some sleep and finally found the problem! It is strange that no one really mentioned a solution to Firefox complaining of this error &#8220;Event.observe is not a function&#8221; when trying to install <a href=\"http:\/\/alexking.org\/projects\/wordpress\" target=\"_blank\">Alex King&#8217;s wp_grin<\/a>. By right it should work, but maybe it is messed up some how (maybe the order of which prototype.js appears later when it should have appeared first or <em>something<\/em>).<\/p>\n<p>No matter, now I simply go into <strong>wp-grins.php<\/strong>, comment out this line:<\/p>\n<p><strong>\/\/ Event.observe(window, &#8216;load&#8217;, loadGrins, false);<\/strong><\/p>\n<p>And then add this as late as possible, which, in my case, only pertains to the actually comment in the template, <strong>comments.php<\/strong>:<\/p>\n<p><strong>&lt;script language=&#8221;Javascript&#8221;&gt;<br \/>\n\/\/ Moved out from wp-grins.php (Firefox was barking)<br \/>\nEvent.observe(window, &#8216;load&#8217;, loadGrins, false);<br \/>\n&lt;\/script&gt;<br \/>\n&lt;p&gt;&lt;textarea name=&#8221;comment&#8221; id=&#8221;comment&#8221; cols=&#8221;100%&#8221; rows=&#8221;10&#8243; tabindex=&#8221;4&#8243;&gt;&lt;\/textarea&gt;&lt;\/p&gt;<br \/>\n<\/strong><\/p>\n<p>And voila! Now I can rest in peace.<\/p>\n<p>Footnote: I&#8217;m running wp 2.0.5 for those who are trying. Also, the page is quite slow now &#8211; due to some incompetent advertising firms, who at time of writing is giving me <em>User advertlets_adv already has more than &#8216;max_user_connections&#8217; active connections in \/home\/advertlets\/domains\/advertlets.com\/public_html\/_\/lib\/connectdb.php on line 7<\/em>. The Event observed require that everything on the page finish loading, before displaying the smilies. Maybe some day I&#8217;ll try to hook onto some other earlier events.<\/p>\n<p>Gimme LOTS of SMILIES! (by leaving a comment that is)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sacrifice some sleep and finally found the problem! It is strange that no one really mentioned a solution&#8230;<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-156","post","type-post","status-publish","format-standard","hentry","category-diary","content-wrap"],"_links":{"self":[{"href":"https:\/\/wp.jiinjoo.com\/index.php?rest_route=\/wp\/v2\/posts\/156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jiinjoo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jiinjoo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jiinjoo.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jiinjoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=156"}],"version-history":[{"count":0,"href":"https:\/\/wp.jiinjoo.com\/index.php?rest_route=\/wp\/v2\/posts\/156\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jiinjoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jiinjoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jiinjoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}