I use this ajax script :
$.ajaxSetup ({
// Disable caching of AJAX responses
cache: false
});
function getRandomInt() {
return Math.floor(Math.random() * Math.pow(10,6));
}
$(document).ready(function(){
$('#edit_in_buy_usd').click(function(){
$.post("edit_id.php?rnd=" +getRandomInt(),
{edit_id: $('#edit_in_buy_usd').val()},
function(data){
$('#id').html(data);
}
);
});
});
after pressing the button, I create a variable that goes to edit_id.php ,performs certain processes and returns the result to the same Div with id="id". Everything works perfectly but ... after pressing the button about 30-40 times the page starts to work super slow. I read a lot of topics I added things but I do not have much experience in Ajax tehnique.... and can not handle it alone ... If you help me I will be very grateful to you .. thank you in advance!