title: need to call ajax function from inside jquery modal dialog box
body: <p>I have a dialog box that loads from an ajax call.. It works good.  I want to have a link inside my dialog box that updates a DB and loads the results via ajax to the parent page, without my dialog closing. Is this even possible?  Here is what I have so far.</p>
  
  <p>This is what my parent page called deals_calendar.php looks like. The ajax call works fine and opens a dialog box that is loaded with content from get_deals.php. </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;  
  $("#calendar td").on('click', function() {
      var data = $(this).data();
  
       $.ajax({
          type:"GET",
              url: "get_deals.php",
              data: { monthID: data.month, dayID: data.day, yearID: data.year },
              success: function(data){
          var title = $( "#dialog" ).dialog( "option", "title", "Deals" );
          $('#dialog').dialog({
                  open: function (event, ui){
                       $('a').blur();
                       $(this).scrollTop(0); 
                      }
              });
          $("#dialog").html(data).dialog("open");
           }   
      });
  
  $("#dialog").dialog(
         {
          bgiframe: true,
          autoOpen: false,
          height: 450,
          width:900,
          modal: false,
            closeOnEscape: true
  
         }    
  );
  });
  
  &lt;/script&gt;
  
  &lt;div id="dialog" title="Dialog Title"&gt; &lt;/div&gt;
  &lt;div id="return"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Then in my get_deals.php script I have this</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;  
  
  
  $('#click').live('click', function(){
  $.ajax({
      type:"POST",
      url: "deals_add_to_queue.php",
      data: { monthID: data.month, dayID: data.day, yearID: data.year },
      success: function(data){
                  alert("Please work!");
                  ("#return").html(data);
           }   
      });
  
  });
  &lt;/script&gt;
  
   &lt;a id="click" href="#"&gt;click me&lt;/a&gt;
  </code></pre>
  
  <p>I can't get this ajax call to fire and update the content on deals_calendar.php.  Any help would be great. thanks</p>