How to continue to use the value to function? Even setTimeout?

$(document).ready(function() {
    product_online(<?=$prodIdForOnline;?>, "<?=$urlForOnline;?>");
    product_update_online(<?=$prodIdForOnline;?>, "<?=$urlForOnline;?>");
  });

  function product_online(id, url){
    $("-sharpproduct_online").load("/models/notify?type=product-online&url="+url+"&id="+id, function(data){
    });
    setTimeout(product_online, 15000);
  };

  function product_update_online(id, url){
    $(".product_online").load("/models/notify?type=product-update-online&url="+url+"&id="+id, function(data){
      console.log("updated");
    });
    setTimeout(product_update_online, 10000);
  };

this is the code I have completed.
at the beginning of ready, I will check the value for function to use
, but it will not be worth it after the setTimeout is exceeded. I know it is because the function of setTimeout faces does not have a value correlation
so how to change the value of ready and then enable function when setTimeout is in progress?!?


setTimeout (code, milliseconds, param1, param2) / / ie9+

or


setTimeout, :

function foo(id) {
    console.log(id);
    setTimeout(function() {foo(id);}, 1000);
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36572-2b782.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36572-2b782.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?