title: why is jquery ajax not sending the data in get request
body: <p>I'm setting up a page where our staff can view a list of items that should be on the shelf and then confirm if the items are there, or send in an alert if there's a problem. </p>
  
  <p>I'm trying to create one function for each situation (item present, item not present, information incorrect) where each function will pass the correct parameters for that situation to a generic function which will make the actual ajax request. </p>
  
  <p>This function is triggered by a button click (when the item is present and correct) and it logs the data correctly:</p>
  
  <pre><code>function log (rec_id,offset) {
      console.log("On Shelf \r\nRecord_Id: "+rec_id+"\r\nOffset: "+offset);
      var rdata =[];
      rdata['id'] = rec_id;
      rdata['status'] = 1;
      rdata['branch'] = $("#branch").val();
      rdata['loc_code'] = $("#location_code").val();
      console.log("log function");
      console.log(rdata);
  
      log_item(rec_id,offset,rdata);      
  }
  </code></pre>
  
  <p>this is what is output to the log: </p>
  
  <pre><code>[id: 1833049, status: 1, branch: "1", loc_code: "mnlp"]
  </code></pre>
  
  <p>the log_item function makes the ajax request</p>
  
  <pre><code>function log_item(rec_id, offset, rdata) {
      console.log("Logging Item: i"+rec_id+"a");
      console.log("log_item function");
      console.log(rdata);
      $.ajax({
          url: 'logItem.php',
          data: rdata
      }).done(function(response){
          console.log(response);
          $("#form").foundation('close');
      });
  }
  </code></pre>
  
  <p>It too logs the data correctly</p>
  
  <pre><code>[id: 1833049, status: 1, branch: "1", loc_code: "mnlp"]
  </code></pre>
  
  <p>But when I view the requests sent, these parameters are not getting passed in request.</p>