Salve
Ho il seguente codice js
codice:
$('.Carica).live("click",function()
{
var ID = $(this).attr("id");
var dataString = 'limite=3';
$.ajax({
type: "POST",
url: "Home.php",
data: dataString,
cache: false,
});
return false;
});
nel php ho
codice:
$limite = 2+$_POST['limite'];
$a = mysql_query("SELECT * from messaggi where id = 1 ORDER by msg_id desc LIMIT $limiete");
while($ab=mysql_fetch_array($a)){
echo $ab['messaggio'];
}
Echo "<a class=\"Carica\" href="\#\">Carica </<>";
Fino a qui tutto bene , esce tutto per se clicco su Carica non sucede niente , se vado tramite link Home.php?limite=2 , 3 , 4, ecc si vede che carica , come posso fare il modo che funziona senza andare tramite link ma carica in automatico ??