GIF89a
function loadLay() { var counter=$("#counter").val(); var newCounter=parseInt(counter)+1; $("#counter").val(newCounter); if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (this.readyState==4 && this.status==200) { document.getElementById("loadLay"+counter).innerHTML=this.responseText; } }; xmlhttp.open("GET","loadNextLayout.php?counter="+counter+"&newCounter="+newCounter,true); xmlhttp.send(); }