views:

7230

answers:

5

Hi All,

i am getting the following error while loading my index page in FF3.0. Sorry, i am unable to paste the script here as it is 2030 lines of code.

element.dispatchEvent is not a function

on expansion it gives me below things,

fire()()prototype.js?1 (line 3972) _methodized()()prototype.js?1 (line 246) fireContentLoadedEvent()prototype.js?1 (line 4006) [Break on this error] element.dispatchEvent(event);

element.dispatchEvent(event); is in line 3972 of prototype.js. I am including prototype.js along with 10s of other js files in my index page.

Has anybody came across this kind of error? please somebody explain me why this error is showing up.

+12  A: 

are you using jquery and prototype on the same page by any chance?

If so, use jquery noConflict mode, otherwise you are overwriting prototypes $ function

perfect. this just ended hours of frustration for me. thanks a lot! :-)
mc6688
Thanks a lot! It did magic for me, too.
Albus Dumbledore
A: 

Nice one boss i was facing the same problem it was because of jquery and prototype

+4  A: 

thanks man.. I had the same problem and Its now solved.. It works for me .. here is the small guide : http://docs.jquery.com/Using%5FjQuery%5Fwith%5FOther%5FLibraries

Niraj Patel
A: 

that was not a great help. i got this error before but enable to solve it now. mostly it gets away by changing the sequece of calling scripts.

bluepicaso
A: 

small thing but great work

sanjay