javascript - After ajax success update input field and fire KeyUp event -


i have input field being dynamically updated ajax function. how fire "keyup" updated input value picked js script. i'm trying mimic user typing number input field. in advance

here code have update input field

    var interval = 500;  // 1000 = 1 second, 3000 = 3 seconds             function doajax() {                 $.ajax({                         type: 'post',                         url: 'speed.php',                         data: $(this).serialize(),                         datatype: 'json',                         success: function (data) {                             $('#kilometers').val(data);                          },                         complete: function (data) {                                 // schedule next                                 settimeout(doajax, interval);                         }                });             }             settimeout(doajax, interval);             $('#kilometers').keyup(update);`` 


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -