Ciao a tutti, non cappisco perchè mi da errore questa semplice chiamata ajax fatta con jquery; il file php richiamato restituisce testo in formato html

$.ajax({
type: "GET",
url: "file.php",
dataType: "html",
success: function(dati)
{

alert("ok");

},
error: function()
{
alert("errore!");
}
});// fine ajax

viene sempre eseguito quell'alert "errore!" eppure il file.php funziona sicuramente in modo corretto..la struttura per ricevere testo html dovrebbe essere giusta così..oppure mi sbaglio? grazie