Need help please with a simple ajax function

Need help please with a simple ajax function

I'm trying to get this ajax function to work.
Backend.php is just counting to 3 with a delay of 1 second after each echo function. I see the backend's display but only after the entire php file is finished and exits. How can I see each count in "real time"?

Bob

the .html file:
========================================================

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Collecting Data...</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>

<script type="text/javascript">
$(function() {
$.ajax({
url: "backend.php",
cache: false,
success: function(html) {
$(".target").html(html);
}
});

});

</script>

</head>
<body>
<div class="target"></div>
<div id="content"></div>
</body>
</html>

=================================================

backend.php:

<?php
$n = 3;
for($i=0; $i<$n; $i++) {
$str = sprintf("%d / %d", $i+1, $n);
echo $str;
sleep(1);
}
?>