Javascript Event Log ~ Console

April 15, 2009 at 5:18 pm | In Js/Ajax | 1 Comment
Tags: , , , , , , ,
  1. /*
  2. Below is the function where to call console()
  3. */
  4. window.document.onclick = function(){ console(window.event.target.onclick) };
  5. function console(msg)
  6. {
  7. mywin = window.open(”, ’console’, ’width=500,height=150,left=800,top=800,scrollbars=yes,location=no’);
  8. if (mywin && msg!=null)
  9. mywin.focus();
  10. mywin.document.title=’Javascript Console…’;
  11. //mywin.document.writeln(‘<h4>Javascript Log here..</h4>’);
  12. if(msg!=null)
  13. mywin.document.writeln(‘<div style=”font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; border-bottom: 1px dotted #FFB64A; padding:4px;”>’+msg+’</div>’);
  14. //mywin.document.writeln(“<br /><a href=\”javascript:void(0)\” onclick=\”this.document.write=”;\” >Clear</a>”);
  15. //sleep(10); mywin.blur();
  16. }

1 Comment »

RSS feed for comments on this post. TrackBack URI

  1. Amazing this is very good and useful function…

    sandeep verma
    (http://sandeepverma.wordpress.com)


Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.