Brian's Blog

items I see across my tribes

JavaScript Output for debugging

June 25
by briancarter 25. June 2011 09:35

Doing some debugging on a weird problem… I was asked about additional debugging; alongside Chrome’s inspect or firebug, one could use:

<!DOCTYPE HTML>
<html>
  <head>
    <title>Learning Javascript</title>
  </head>
  <body>
    <p>JavaScript Output for debugging 
	
	<script>
		document.writeln('This is document.writeln');
		alert('This is alert');
		console.log('This is console.log');
	</script>
  </body>
 </html>

Turned out, the sites using the HTML5 doctype (as shown) worked in IE.. the other one didn’t.  IE didn’t like the fixed position.  After some research, using this doctype puts IE in standards compliant mode.  Not sure why this isn’t the default.

Categories: Development


 Questions or Feedback, my contact information is located on my About page.


The opinions, thoughts, and comments made in these blog posts are solely my own (unless otherwise stated). They do not reflect the opinions, thoughts or practices of my employer, my universities, my family, or anyone else. Also, I retain the right to change my mind about anything I publish here without having to go back and edit posts that occurred in the past. 

These are my opinions, or just as likely, someone else's opinions that I leveraged for my own.