title: How do I send data in JavaScript onclick call and then access it in the click handler function?
body: <p>This has had me stuck for a while... My web searches regarding the onclick JavaScript call has it sometimes with a capital C as in onClick and other times onclick. My code is part of a JQuery Mobile app but the onclick is JS. So, it looks like this:</p>
  
  <pre><code>domEntry = '&lt;li&gt;&lt;a href="#poet-details"';
  domEntry += ' onclick="getPoetDetails('+ poet_name + ')"&gt;';
  domEntry += poet_name;
  domEntry += '&lt;/a&gt;&lt;/li&gt;';
  </code></pre>
  
  <p>I'm going to add that to a div. 'poet_name does display correctly with the 3rd line. How do I access it in getPoetDetails? Did I call it right?
  Also, please see: <a href="http://jsfiddle.net/brucewhealton/XF5AJ/" rel="nofollow">http://jsfiddle.net/brucewhealton/XF5AJ/</a></p>
  
  <p>The function getPoetDetails can be seen at the link given. Do I access it through an event object variable? The application sends a query string to another location, dbpedia.org/sparql, and gets back JSON. I need the poet_selected or poet_name for the second query to get details about the poet because my app is so far only listing poets, not very interesting. I want to figure this out so that I can start my app by letting the user select the nationality from among a category of "Poets_by_nationality" on DBpedia.org. My problem is capturing the user's selection, what they click on or tap on in a JQuery Mobile app and sending it to another function.
  Thanks,
  Bruce </p>