"element.dispatchEvent is not a function" js error caught in firebug FF3.0

I get the following error while loading my index page in FF3.0. Sorry, I can’t paste the script here, since it is 2030 lines of code.

element.dispatchEvent is not a function

When expanding it gives me below things

fire () () prototype.js? 1 (line 3972)

_methodized () () prototype.js? 1 (line 246)

fireContentLoadedEvent () prototype.js? 1 (line 4006)

[Break this this error] element.dispatchEvent (event);

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

Has anyone encountered such an error? Please explain to me why this error appears.

+49
javascript firebug element
Jun 11 '09 at 12:00
source share
5 answers

Do you use jquery and prototype on the same page randomly?

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

NoConflict mode is activated as follows:

 <script src="jquery.js"></script> <script>jQuery.noConflict();</script> 

Note: with this, the dollar sign variable no longer represents the jQuery object. In order not to rewrite all of your jQuery code, you can use this little trick to create a dollar icon area for jQuery:

 jQuery(function ($) { // The dollar sign will equal jQuery in this scope }); // Out here, the dollar sign still equals Prototype 
+96
Jul 16 '09 at 2:50
source share

After the jQuery script tag adds

 <script>jQuery.noConflict();</script> 

to avoid conflict between prototype and jQuery.

+9
Aug 20 '13 at 19:58
source share

You must add

<script>jQuery.noConflict();</script>

after

 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
+1
Feb 22 '13 at 7:30
source share

Change the following line

 $(document).ready(function() { 

For

 jQuery.noConflict(); jQuery(document).ready(function($) { 
0
Nov 22 '17 at 7:28
source share

check this by calling jQuery libraries after noconflict.js or is it calling more than once the jquery libraries after noconflict.js

-one
Jun 17 '16 at 22:11
source share



All Articles