Firebug Error Console Is Not Defined
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and
Firebug Deactivated
policies of this site About Us Learn more about Stack Overflow the company firebug save changes Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
Reset Firebug To Default Settings
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a firebug console not working minute: Sign up Why is Firefox 3 breaking with console.log up vote 11 down vote favorite 5 I have the following: console.log (a.time_ago() + ' ' + b.time_ago()); This is breaking in FireFox 3, meaning when FF hits that line in the JS, it goes no further. Strangely if I have Firebug open it doesn't break and continues as normal. Some how to save changes in firebug html how firebug prevents this issue? I'm puzzled on this one. Any thoughts as to why console.log would break firefox 3, but not if firebug is open? Thanks javascript firefox firebug firefox-3 share|improve this question edited Feb 10 '11 at 22:14 Pekka 웃 304k93697913 asked Feb 10 '11 at 22:13 AnApprentice 25.3k102384703 Isn't console.log part of firebug? and hence if its not open, there's no container to paste to... –Adam Holmes Feb 10 '11 at 22:16 add a comment| 6 Answers 6 active oldest votes up vote 30 down vote accepted This is not just Firefox. Your code will stop working in every browser (except Chrome and safari (in some instances) because they have console.log() built in along with their developer tools.) It is because when you don't have firebug open, the object "console" is not defined. You should take care never too leave console.log() functions in your code, or it will break in every browser. I'd like to add that I have sometimes used this function: function log () { if (typeof console == 'undefined') { return; } console.log.apply(console, arguments); }
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and
Firediff
policies of this site About Us Learn more about Stack Overflow the how to disable firebug for a site using javascript company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
How To Activate Firebug In Firefox
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes http://stackoverflow.com/questions/4963354/why-is-firefox-3-breaking-with-console-log a minute: Sign up Firebug console, giving error “function not defined” up vote 0 down vote favorite I am trying to submit a form through Ajax, but it is not calling the function? I'm getting this error on the Firebug console: ReferenceError: CreateUser is not defined CreateUser() The button I am using to call this function: http://stackoverflow.com/questions/16249620/firebug-console-giving-error-function-not-defined value="Sign Up" name=""> My function: What is causing this issue? Why cant it find the function name? php javascript jquery html function share|improve this question edited Apr 27 '13 at 7:51 Simon Adcock 2,97131635 asked Apr 27 '13 at 7:40 Sizzling Code 1,55193271 3 Declaring function outside document.ready will solve it. –Dipesh Parmar Apr 27 '13 at 7:42 @DipeshParmar Yup you are right, needed it to declare outside of document.ready thankyou. –Sizzling Code Apr 27 '13 at 8:29 add a comment| 4 Answers 4 active oldest votes up vote 2 down vote accepted You're creating a closure around your CreateUser function by putting it inside of an anonymous function. CreateUser is "local" to the scope of the containing function and is not exposed to the global scope where your onclick event is being defined. Simply take the function outside of the $(document).ready block. share|improve this answer answered Apr 27 '13 at 7:44 mpen 86.1k124491748 My mistake, i didn't needed to define it under t
Source Firebug Lite Extensions Follow Firebug news on Twitter Firebug FAQs Installation What license does Firebug use? How do I install Firebug? Can I use Firebug on non-Firefox browsers? To which https://getfirebug.com/faq/ versions of Firefox is Firebug compatible? How to install Firebug into a clean profile? Usage Is there some basic description of how Firebug works? How can I see which version of Firebug I have? Activation How do I open Firebug? How does the activation model of Firebug work? Preferences How do I reset all Firebug options? Are there options, which you can't how to set through the UI? Console Panel How to enable the Console panel? How does the Console panel work? Does Firebug interfere in any way with jQuery's $ shortcut? Why does console.log() not work? Why do I get the error "console is not defined"? HTML Panel How does the HTML panel work? Where is the source shown inside the HTML panel located? Why do firebug error console the HTML panel contents look different than my source file? How can I save changes I made inside the HTML panel back to my source file? Why keeps the HTML panel scrolling up? Why do the source links inside the Style side panel not refer to my CSS file? What does the number after the file name inside the Style side panel mean? CSS Panel How can I save changes I made inside the CSS panel back to my source file? Why does the CSS in the CSS panel look different to the one in my file? Script Panel Why does the Script panel claim there's no JavaScript on the page when there obviously is code? Is there an option to de-minify JavaScript? Why is there no syntax highlighting? DOM Panel What do the different colors of the variables mean? Net Panel Why are jQuery AJAX requests not listed when I filter by XHR? Extensions An extension I use conflicts with Firebug. Where should I report that? How to write a Firebug extension? Can you check the code I wrote for my Firebug extension? Miscellaneous