Trying to return a value from a single cell using the map function

Trying to return a value from a single cell using the map function

Not sure this is the correct forum, this is my first time posting, here. I apologize if it's not. In my program, I place data into a cell in a table from a popup

  1. <script>
  2. function updateValue(driver_name, value){
  3.  var which_driver = value;
  4. //alert("Driver Is " + value);
  5. //alert("Row Is " + whichRow);
  6. reservations.rows[whichRow].cells[7].innerHTML = which_driver;//
  7. //reservations.rows[whichRow].cells[7].textContent = which_driver;
  8. //'#reservations tr:eq(whichRow) td:eq(8)'.text('Test');
  9.    //console.log(testelements);
  10. }
  11. </script>
  12. The data shows up fine when I use either innerHTML or textContent, however I use this function to try and retrieve the values of certain checked rows.

  13. <script type="text/javascript">
  14. $(function()
  15. {
  16.     $('#submitButton').click(function(){
  17.         var values = $("#main_table table input[name=name]:checked").map(function() {
  18.                 row = $(this).closest("tr");
  19.                 return { 
  20.                          recordid    : $(row).find('input[name=record_id]').val(),
  21.                          firstname   : $(row).find('input[name=firstname]').val(),
  22.                          lastname    : $(row).find('input[name=lastname]').val(),
  23.                          timeneeded  : $(row).find('input[name=timeneeded]').val(),
  24.                          dateneeded  : $(row).find('input[name=dateneeded]').val(),       
  25.                          pickup      : $(row).find('input[name=pickup]').val(),       
  26.                          dropoff     : $(row).find('input[name=dropoff]').val(),       
  27.                          drivername  : $(row).find('td:lt(7):gt(6)').text()
  28.                         }
  29.             }).get();
  30.         console.log(values);
  31.     });
  32. });

  33. </script>

  34. When I view the objects in the console every part of the array is filled in with the exception of 'drivername',  the code I use is now returning enough empty spaces to show it hit the correct cell, but nothing shows up.  Does anyone have any suggestions

  35. TIA