0

I have no idea how to even really describe this problem I am having.

I have a table that is loaded with jquery here:

<div class="row">
  <div class="col-md-12">

    <div id="table"></div>

  </div>
</div>

<script>
  function displayFFTabs() {
    $('#table').load('pages/front/locations/table.php', function() {});
  }

  displayFFTabs();
</script>

This table has contenteditable cells, which should then be processed by this jquery every time a cell is clicked (Possibly edited) and then clicked off of.

$(function() {
  $("td[contenteditable=true]").blur(function() {
    var field_userid = $(this).attr("id");
    var value = $(this).text();
    $.post('pages/ajax/updateLocations.php', field_userid + "=" + value, function(data) {

    });
  });
});

I'm using chrome, with firebug, to spot potential problems.

The problem I am currently having is when I load the page, if I do not wait 3-5 seconds before doing anything, nothing that is edited is ever saved to the database, as in it's not even showing as called in firebug.

For example, lets just say I load the page If I immediately click on any cell, the jquery function that is meant to save the data will never ever be called unless I refresh the page and wait 3-5 seconds.

I'm stumped here, and would love some direction.

mplungjan
  • 169,008
  • 28
  • 173
  • 236
GrumpyCrouton
  • 8,486
  • 7
  • 32
  • 71

0 Answers0