title: What does `success: function(msg)` mean in my jQuery Ajax call?
body: <p>I have two jQuery Ajax calls that I'm combining on a page. I'm stuck on the <code>success: function()</code> in each, as one is <code>success: function(msg)</code> and the other is <code>success: function(data)</code>. I'm unsure of what both of these mean, and what they should be in the combined code. I'll place the two calls below, separately, and combined as I have them thus far.</p>
  
  <p><strong>Ajax Request #1:</strong> there is a <code>$msg .= "&lt;div class='pagination'&gt;&lt;ul&gt;";</code> on this functions php page. Not sure if that is what this is referring to.</p>
  
  <pre><code>$.ajax
  ({
      type: "GET",
      url: "new_arrivals_data.php",
      data: "page="+page,
      success: function(msg)
      {
          $("#gallery_container").ajaxComplete(function(event, request, settings)
          {
              gallery_show();
              loading_hide();
              $("#gallery_container").html(msg);
          });
      }
  });
  </code></pre>
  
  <p><strong>Ajax Request #2:</strong> As far as I can see, there is no <code>data</code> anywhere on this call's php file. Don't know what <code>function(data)</code> is referring to. </p>
  
  <pre><code>$.get("new_arrivals_data.php",{imgs: value}, function(data){
      $("#gallery_container").html(data);
  });
  </code></pre>
  
  <p><strong>Combined Request:</strong> I have put a <code>?</code> where <code>msg</code> was in the original call as I'm unsure what to put in it's spot.</p>
  
  <pre><code>$.ajax
  ({
      type: "GET",
      url: "new_arrivals_data.php",
      data: {page:page, imgs: value},
      success: function(?)
      {
          $("#gallery_container").ajaxComplete(function(event, request, settings)
          {
              gallery_show();
              loading_hide();
              $("#gallery_container").html(?);
          });
      }
  });
  </code></pre>