On Tue, Oct 7, 2008 at 3:29 PM, Miguel Beltran R. <[EMAIL PROTECTED]> wrote:
> <script languaje="JavaScript" type="text/javascript">
>  //for detect if is installed Firebug or FirebugLite
>   if(!console){
>      var console = {
>         log: function(a){}
>      };
>   };
> </script>

I use the same technique and it works fine. Here is my exact code that
works great in IE.

// for debugging firebug style, in browsers that don't have firebug
if (!console){
  var console = {
    initialize: function(){
      $(document.body).insert('<textarea id="fake-firebug-console"
      console.logger = $('fake-firebug-console');
    log: function(string){
      if (!console.logger) return;
      // IE is funny about carriage returns in a textarea
      console.logger.insert(string + (Prototype.Browser.IE ? "<br />" : "\n"));
      if (!console.logger.visible()) console.logger.show();

Then in a page load observer I do this:

document.observe('dom:loaded', function(){
  if (console.needsSetup) console.initialize();

Hope this helps.


You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to