get id of button in button handler javascript
<p>I'm updating a page through ajax, so I'm creating (text) buttons dynamically.  I know how to set up an onclick event, but then how to I get the id of the button in the handler?</p>

<p>Using sinatra with ruby and jquery 1.5.
Here is the partial code:</p>

<pre><code>&lt;div onclick='my_handler()' &gt;&lt;a&gt;&lt;href&gt;[Edit]&lt;/href&gt;&lt;/a&gt;&lt;/div&gt;
</code></pre>

<p>and the js code:</p>

<pre><code>function my_handler (){
   alert ("button id is ..." )
}
</code></pre>

<p>thanks</p>
