views:

33

answers:

1

Usually, Firebug gives a half decent error message when something goes wrong or doesn't compile. In this case though, I am simply getting the following:

X: $(
$('#' + divName).emtpy(); 

The code is something like this:

// Some code that sets variable row_entry
// debugger;
$('#' + divName).emtpy();
$('#' + divName).append(row_entry);

When I uncomment the debugger, and look at it in Firebug, I can call the methods:

>>> $('#' + divName)
[tr#row_1]
>>> $('#' + divName).emtpy();
>>> $('#' + divName).append(row_entry);
[tr#row_1]

The row_entry is set initialized correctly, and this makes the webpage look as I desire, but Firebug throws this error on regular execution, and the same thing happens when I resume the code after the debugger testing. The page also does not load correctly when Firebug is not running.

Can someone please explain what is going on?

+2  A: 

As Paul in the comments has suggested as well....you've spelled empty incorrectly many times in your code.

RC
So, the reason it worked in the Firebug console would be the following: I cut and paste the lines from my code to be sure they were the same (ie. the same miss-spelling of empty). The code didn't work in the console, but allowed me to still manually run the next command to append. Meanwhile, in the actual execution, the code hit that incorrectly spelled 'emtpy' and aborted, and the append never got run. That's what you get for typing too fast.
Curtor