Ajax功能只能使用一次

I'm calling a ajax function that updates input form text value to mysql database, it works fine the first time i call the ajax function but if i call it again nothing get's updated.

HTML and JavaScript:

<html>
<head>
<script type="text/javascript">
function updateTitle() {
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
    }
  }
var otsikko = document.getElementById('otsikko').value;
xmlhttp.open("POST","gettable.php",true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT"); 
xmlhttp.send('otsikko=' + otsikko);
}
</script>
</head>
<body>

<form name="test" action="javascript:updateTitle()" method="post">
<input type="text" id="otsikko" value="pagetitle">
<input type="Submit" value="Update">
</form>
<div id="txtHint"></div>

</body>
</html>

PHP:

$otsikko=$_POST["otsikko"];
$con=mysql_connect('localhost', 'admin', 'password');
if
(!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
mysql_select_db("database", $con);
mysql_query("UPDATE site_content SET pagetitle='$otsikko' WHERE longtitle='jee'"); 
echo "Updated!";
echo $otsikko;
mysql_close($con);