jQuery keyup/onchange bug -


a user can insert order values via large number (>500) of input fields on page:

<input type="text" name="%id%" data-product_id="%id%" class="updateqtyfield" maxlength="4"> 

it isn't possible use 'save' button make use of jquery script updating insert data session:

  $("input.updateqtyfield").keyup(function() {     $.post("update.php", { product_id: $(this).data('product_id'), qty: $(this).val() }, function(result) { if (result != 1) { alert(result); } });   }); 

unfortunately, there possibility $.post request didn't update field , have absolutely no idea why. because users of system working quick: insert value - tab - insert value - tab - etc. via log i've seen keyup trigger works well, $.post doesn't job. looks there isn't respons post job.

i've tried use workaround via onchange action, isn't preforming well, again not fields updated correctly. option i've tried working give performing issues: send on every keyup alle input fields. result good, page freeze few seconds , ins't solution.

the php file update.php simple file: $_session['productqty'][$_post['product_id']] = $_post['qty'];


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -