title: Creating DOJO buttons with Javascript function causing conflicts in buttons created
body: <p>my apologies for any mistake in english, I am brazilian.</p>
  
  <p>I have a website with DOJO library, I use it in many things.</p>
  
  <p>I am having some dificulty to create buttons in javascript. </p>
  
  <p>I wrote a function to create the buttons, it is working, creating buttons.</p>
  
  <p><strong>But, when a new button is created, the former button lost the event "onclick".</strong></p>
  
  <p>It can be viewed here: <a href="http://jsbin.com/xuzevi/edit?html,js,output" rel="nofollow">http://jsbin.com/xuzevi/edit?html,js,output</a></p>
  
  <p>To create the button, I used this code:</p>
  
  <pre><code>require([ 'dojo/dom', 'dojo/parser', 'dijit/form/Button', 'dojo/domReady!' ], 
          function( dom, parser, Button)
          {
              var div_Compra = document.getElementById(p_Div);
              if( ! div_Compra ) { console.log('ERRO - div_Compra: '+p_Div); return false; }
  
              var botao = new Button({ label: '' });
              if( ! botao ) { console.log('ERRO - botao'); return false; }
  
              botao.startup();
              botao.set('iconClass', 'dijitEditorIcon dijitEditorIconSelectAll');
              botao.set('showLabel', false);
              botao.placeAt(div_Compra);
              botao.on('click', function() { Mensagem(p_Indice); }); 
          }
  );
  </code></pre>
  
  <p>Thanks.</p>