title: How to attach a variable/value on onclick in href
body: <p>I've been studying Web and PhoneGap recently and I am stuck at this problem. I have a sqlite db. I was able to query the necessary data I need. However, I want to pop an alert in each element generated from the query.</p>
  
  <pre><code>html += '&lt;a href="#" class="category-btn" title="All" rel="external" onclick="alert(\'app.listDisplay: \' );"&gt;'+ res.rows.item(i).name  +'&lt;/a&gt;';
  </code></pre>
  
  <p>The onclick successfully pops an alert, but I want to show my the value <code>res.rows.item(i).name</code> in my alert. How can I achieve this? Thanks</p>