Orginally posted in the Palm dev forums:

event.target.id will return the id of the html element that was tapped. (Just make sure that the actual element has an id defined.)
In the case of widgets it seems the id gets changed by the framework. For example I have a button declared like so:
Code:
<div x-mojo-element="Button" id="btn1" class="my-button"></div>
But in it's event handler event.target.id=palm_anon_element_15mojo-scene-Mainbtn1-buttonLabel

I've gone all though the event object and can't find my original id anywhere. I was hopping to be able to get the id from the event because I'm using a single handler for several related buttons. If I can't get the original id I need some way to identify which button the event is associated with. I've tried using innerHTML and innerText but they seem flaky in that sometimes they include html code (seems to happen when events are fired in rapid succession) so I'm not too thrilled with them. Got to be some way to get id or name or something to identify the button from the event. Any ideas?