Event.observe is not a function – Resolved!

Sacrifice some sleep and finally found the problem! It is strange that no one really mentioned a solution to Firefox complaining of this error “Event.observe is not a function” when trying to install Alex King’s wp_grin. 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 something).

No matter, now I simply go into wp-grins.php, comment out this line:

// Event.observe(window, ‘load’, loadGrins, false);

And then add this as late as possible, which, in my case, only pertains to the actually comment in the template, comments.php:

<script language=”Javascript”>
// Moved out from wp-grins.php (Firefox was barking)
Event.observe(window, ‘load’, loadGrins, false);
<p><textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”4″></textarea></p>

And voila! Now I can rest in peace.

Footnote: I’m running wp 2.0.5 for those who are trying. Also, the page is quite slow now – due to some incompetent advertising firms, who at time of writing is giving me User advertlets_adv already has more than ‘max_user_connections’ active connections in /home/advertlets/domains/advertlets.com/public_html/_/lib/connectdb.php on line 7. The Event observed require that everything on the page finish loading, before displaying the smilies. Maybe some day I’ll try to hook onto some other earlier events.

Gimme LOTS of SMILIES! (by leaving a comment that is)

Print Friendly, PDF & Email

4 Responses

  1. :mrgreen: 😐 😈 ➡ 😯 🙂 😕 😎 👿 😀 💡 😳 😛 🙄 😉 😥 😮 😆 😡 🙁 ❗ ❓

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to Top