title: Background image javascript HTML5 canvas
body: <p>I'm trying to create a simple game using javascript to run on a simple webpage. For some reason, I can't get it to load a background image. I've searched repeatedly and tried numerous ways but I ended up with a black-white canvas. Please, help me as I'm at my wits end.</p>
  
  <p><strong>Here's my code snippet:</strong></p>
  
  <pre><code>&lt;body&gt;
  
  
  &lt;!-- Site navigation menu --&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="index.html"&gt;Play Game&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="about.html"&gt;About&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="help.html"&gt;Help&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  
  
  &lt;!-- Creating the canvas --&gt;
  &lt;canvas id= "gameCanvas" width="600" height="480"&gt;&lt;/canvas&gt;
  
  &lt;script&gt;
  var canvas = document.getElementById("gameCanvas");
  var ctx = canvas.getContext("2d");
  var bkGround = new Image();
  bgImage.src = '/images/backGround.jpg';
  bkGround.onload = function(){
  ctx.drawImage(bkGround,69,50);   
  }​
  &lt;/script&gt;
  </code></pre>
  
  <p>Anticipated thanks.</p>