How do I get the onclick variable into a dialog function
<p>I have a onclick event that has a value in it that I want to post to a backend php script. Just not sure how to get it in the dialog function. </p>

<pre><code>function reorder(job_index)//&lt;--------this fella
{
  $('#dialog').dialog('open');
}
$(document).ready(function(){
 $(function() {
  $("#dialog").dialog({
  bgiframe: true,
  autoOpen: false,
  height: 250,
  width: 600,
  modal: true,
  buttons: {
   'Yes, use the number above': function() {
   var jobID=$("#jobnumber").val();
   $.post("rpc.php",  {   
        job_index:job_index,// &lt;-------to here   
        jobID:jobID,
        method: "reorder"
        },
 function(data,textstatus)
  {
  alert(data.message); 
  }, "json");
   },
   'No, create a new number for me': function() {
    $(this).dialog('close');
  },
   Cancel: function() {
    $(this).dialog('close');
   }

  }
 });
});
});
</code></pre>

<p>The value is job_index. Any tips?</p>

<p>Thanks</p>
