Uncaught TypeError: Object [object Window] has no method 'addEvent'

Asked by Dan Tucker

Hi

Have installed this module which works really well on my site, however there are a few pages where I am seeing the following error in console

Uncaught TypeError: Object [object Window] has no method 'addEvent'

for the following line

//function startSloganRotation(selector,delay,transition){
window.addEvent('domready', function() {

and the sloganator module then doesn't display. Can you please offer any suggestions as to how this may be resolved?

Kind regards

Question information

Language:
English Edit question
Status:
Solved
For:
Sloganator Slogan Rotator Edit question
Assignee:
No assignee Edit question
Solved by:
Tim Black
Solved:
Last query:
Last reply:
Revision history for this message
Best Tim Black (tim-alwaysreformed) said :
#1

The console error means the way to solve this is to debug the JavaScript error. This could be due to a conflict between two JavaScript libraries in that page. But http://stackoverflow.com/questions/10705417/uncaught-typeerrorobject-window-has-no-method-addevent and http://mootools.net/docs/core/Element/Element.Event#Element:addEvent say that the window.addEvent event is not provided by the browser, but rather is provided by MooTools. So that indicates to me that for some reason the pages on which you get this error are probably not loading MooTools. Check to see if mootools.js is being loaded in the page, and go from there. If you'd like, post a link here to a page that throws that error and I'll take a look at it.

Revision history for this message
Dan Tucker (nospam-please) said :
#2

Hello Tim, thank you very much for your fast response, that's solved my problem. Mootools wasn't loading on particular pages so I've added it to my template header which means Sloganator is now working across the site. Many thanks