title: Dojo Popup Menus - Connect a menu item event to multiple 'triggering' elements
body: <p><b>What i have</b> is a single dijit.Menu that contains the dijit.MenuItem objects with labels 1 - 9. It is connected to a sudoku like grid of 81 'nodes' (because there are so many, i dont bother with individual id's, i simply collect them with dojo.query('their-css-class-name')). This is the code i'm using inside of a widget to instantiate the context menu and its menu items.</p>
  
  <pre><code>    var contextMenu = new dijit.Menu({targetNodeIds:dojo.query(".sudokuNode"), leftClickToOpen:true});
  
      for(var i = 1; i &lt;= 9; i++) {
          contextMenu.addChild(new dijit.MenuItem({
              label:i,
              onClick: function(evt) {
                  //??
              }
          }));
      };
  
      contextMenu.startup();
  </code></pre>
  
  <p><b>What i'm trying to do</b> is have the node that is clicked, and subsequently opens a popup/context menu, be filled with the value (1-9) selected from the context menu's MenuItems. </p>
  
  <p><b>My problem</b> is that i dont know how to "know" which of the 81 nodes was the one to fire the oncontextmenu event, and i dont know how to reference that node inside the 'onClick' method declared in the menu item. </p>
  
  <p>Any help demonstrating how to reference the calling node in that context would be appreciated! If this isn't enough information, let me know what else i can do to explain my problem! </p>