views:

497

answers:

2

I'm using dojo and dijit and have an inlineEditBox widget. I'm trying to capture the onchange event and send a key/value post to a php page (to set into a database). The value is the new value just submitted, available from e.target.value. That's easy.

I'd like the key value to be the id of the inlineEditBox widget. How can I access that programatically?

A: 

This may be a stupid suggestion, but isn't it in e.target.id?

RichieHindle
+2  A: 

Since InlineEditBox is a widget it's best not to monitor DOM level events. Instead, why not connect to InlineEditBox.onChange? For example:

<span dojoType="dijit.InlineEditBox" ...>
     <script type="dojo/connect" event="onChange" args="value">
          console.log(this.id + " changed to value" + value);
     </script>
</span>
Bill Keese