title: Pass json through click event to jQuery function
body: <p>I have this old "closed" system where it runs IE in its own container, meaning I have to code like a caveman in many cases because I can't use any browser developer tools/console to x-ray the objects being returned from the remote system.</p>
  
  <p>Now, the specific function I'm looking at is a callback from a third party (it gets complicated) that returns what I am willing to bet is a standard JSON object.</p>
  
  <pre><code>function core_OnUeDeltaItemsUpdate(dataType, oData)
  {
      if (dataType == "Units")
      {
          // Bail if dispatch report xml hasn't been loaded yet.
          if (oXml == null)
              return;
  
          ..... does lots of stuff
  
          // Reload the content in case any of our displayed units changed
          processUeDelta.click();
      }
  }
  
  ... at the bottom of the page
  
  &lt;button style="display:none;" type="button" id="processUeDelta"/&gt;
  </code></pre>
  
  <p>and the attached javascript file that I was hoping would use jQuery</p>
  
  <pre><code>$(function(){
      $("#processUeDelta").click(function(){
          var i = 0;
          alert(this.ueDelta);
          for(var propertyName in this.ueDelta)
          {
              i++;
              alert("property " + i + ": " + oData[propertyName]);
          }
      });
  });
  </code></pre>
  
  <p>Now, currently the last function that binds itself to the hidden button cannot parse oData. I'm stuck on two things here.</p>
  
  <ol>
  <li>I'm not sure <em>how</em> to pass the oData object to the attached eventhandler</li>
  <li>I'm not too keen on this design, perhaps there is another way were I can take out the intermediary button so I can then process the JSON data object oData.</li>
  </ol>
  
  <p>Points of note: </p>
  
  <ul>
  <li>This is based on a data pump, so this callback is being called on an average of 5s.</li>
  <li>I am limited to using jQuery 1.7.1</li>
  <li>I cannot see the object, my browser cannot act as a test harness, there are too many moving parts for me to be able to test it from outside the application.</li>
  </ul>