Tutorial :misspelling javascript function alert to alerler('hell'); and firebug doesn't report an error?



Question:

misspelling javascript function alert to alerler('hell'); and firebug doesn't report an error.

Why is that? It is enabled for localhost (or my site).


Solution:1

I'm guessing you mean you have a <script> that has a call to alerler somewhere, right? Well, Firebug only catches errors for code that gets run. ;) So if the code with the misspelled function isn't actually run after the page loads, Firebug won't catch the error. This is the only reason I can think of as to why Firebug didn't catch your error.


Solution:2

Works On My MachineTM, or should I say Doesn't Work On My MachineTM

>>> alerler('test');  ReferenceError: alerler is not defined  


Solution:3

Maybe your FireFox Error Console (Ctrl+Shift+J) could help you on that


Solution:4

Firebug has some weird quirks sometimes like if you setup a debugger; and refresh the page without stopping the debugger, firebug well no longer work properly. Sometimes you get lucky and don't have to restart the browser.


Solution:5

This is very unlikely, could you have defined a function?

function alerler(text) {      // this is a possibility!  }  

Though, I would say musicfreak has the most probable reason.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »