title: "Normal" button-clicking approaches are not working in Greasemonkey script?
body: <p>Here is the button on the page:</p>
  
  <pre><code>&lt;a id="dispatchOnJobButton" class="ui-btn ui-btn-corner-all ui-shadow ui-btn-up-c" href="#" data-role="button" data-theme="c" data-disabled="false"&gt;
  &lt;span class="ui-btn-inner ui-btn-corner-all" aria-hidden="true"&gt;
  &lt;span class="ui-btn-text"&gt;Dispatch on next job&lt;/span&gt;
  &lt;/span&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p><br>
  I need Greasemonkey to click it.  I tried many different methods, but none seem to fire whatever function it is supposed to run.</p>
  
  <pre><code>var clickEvent = document.createEvent("MouseEvents");
  clickEvent.initEvent("click", true, true);
  document.getElementById('dispatchOnJobButton').dispatchEvent(clickEvent);
  
  // also tried
  document.getElementById('dispatchOnJobButton').click();
  // and this
  unsafeWindow.document.getElementById('dispatchOnJobButton').click();
  </code></pre>
  
  <p>any ideas on something else I could try?</p>