先生、何か問題があります。この ajax コードは google chrome で動作しますが、firefox では動作しません。firefox のプロパティは Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.0.19) Gecko/2010031218 です。 Firefox/3.0.19
<script>
function showUser(str)
{
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
return;
}
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)
{
// alert(xmlhttp.responseText);
document.location.reload(true);
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("POST","http://localhost/first_project/index.php/admin/selectUser/blank?q=" + str,true);
xmlhttp.send();
}
</script>
解決策を教えてください。前もって感謝します。