title: If Statement to display image
body: <p>I'm having a problem with my code.
  I have a set of options which, depending on which one the user picks, should generate a different image for each one.</p>
  
  <p>Here is what I have in my body - the select menu and an empty div waiting to be filled when the function is called.</p>
  
  <pre><code>&lt;form&gt;
  &lt;select name="choice" id="choice" size="3" onchange="createDoll(this.value)"&gt;
  &lt;option value="0"&gt;Vintage&lt;/option&gt;
  &lt;option value="1"&gt;Plaid&lt;/option&gt;
  &lt;option value="2"&gt;Skater&lt;/option&gt;
  &lt;option value="3"&gt;Maxi&lt;/option&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  
  &lt;div id="display_here"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My Javascript contains this:</p>
  
  <pre><code>function createDoll(userChoice)
  {
      // clear the div where result is displayed
  document.getElementById("display_here").innerHTML = "";
  
  // defined names
  var choices = new Array("Vintage", "Plaid", "Skater", "Maxi");
  
  
  // output sentence
  var sentence = "&lt;p&gt;You picked a " + choices[userChoice] + " doll.&lt;/p&gt;"
  
  
  
  if ( (userChoice == 0) || (userChoice == 1))
  {
      // create a sentence
      // display image    
      document.getElementById("display_here").innerHTML = sentence + "image goes here";
  </code></pre>
  
  <p>Where the text 'image goes here' is held, I want the image to be displayed but cannot figure out how to do this. I have tried image tags and making the images a variable but nothing will work. Any ideas?</p>