title: how can I add an Image to my javascript If statement?
body: <pre><code>for(var i = 0; i &lt; data.invoices.length; i++) {
  
    var unix_timestamp = data.invoices[i].invoiceDate;
  
  var date = new Date(unix_timestamp);
  // hours part from the timestamp
  var day = date.getDate();
  // minutes part from the timestamp
  var mnth = (date.getMonth())+1;
  // seconds part from the timestamp
  var yr = date.getFullYear();
  
  var p = "";
  
  if(data.invoices[i].paid == false) {
  p = "Outstanding";
  } else {
    p = "Paid";
  }
  
  
  if(i%2 == 1) {
    tableRow = '&lt;tr&gt;';
  } else {
  tableRow = '&lt;tr class="EDBGreyBackground"&gt;';
  }
  
  tableRow += '&lt;td height="40" valign="middle" align="left"&gt;'+day+'-'+mnth+'-'+yr+'&lt;/td&gt;';
  tableRow += '&lt;td height="40" valign="middle" align="left"&gt;&amp;pound;'+data.invoices[i].amountDue+'&lt;/td&gt;';
  tableRow += '&lt;td height="40" valign="middle" align="left"&gt;'+p+'&lt;/td&gt;';
  tableRow += '&lt;td height="40" valign="middle" align="left"&gt;&lt;a href="'+data.invoices[i].printableBill+'"&gt;&lt;img class="floatNone" width="25" height="25" border="0" alt="PDF" src="images/EDB_PDF_icon.png"&gt;&lt;/a&gt;&lt;/td&gt;';
  tableRow += '&lt;/tr&gt;';
  
  $('#previousBillhistory').append(tableRow);
  
    }
  </code></pre>
  
  <p>I am trying to change the word PAID in my IF statement to an image, can anyone point me in the right direction please.</p>
  
  <p>thank you</p>
  
  <p>Updated with the whole code snippet.</p>
  
  <p>Thank you again</p>