xmlhttp-> open不会打开php文件

My code below doesn't seem to be reaching the PHP file using the xmlhttp->open function. The function works with the field it's connected to, but once it gets to send, it doesn't activate the PHP file at all.

<script  type="text/javascript">
function showCity(str)
{
if (str=="")
  {
  document.getElementById("top_banner_id").innerHTML="";
  return;
  } 

  xmlhttp=new XMLHttpRequest();

  xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {

    document.getElementById("top_banner_id").innerHTML=xmlhttp.responseText;
    }
  }

  xmlhttp.open("GET","townGrab.php?q="+str,true);
  xmlhttp.send();
}
</script>

This is the error I'm getting in the Chrome console. I fixed the event handler error by changing the source file to the latest version of jQuery. However, there's an internal server error that remains to deal with:

Error in event handler for 'undefined': IndexSizeError: DOM Exception 1 Error: Index or size was negative, or greater than the allowed value.
    at P (chrome-extension://mgijmajocgfcbeboacabfgobmjgjcoja/content_js_min.js:16:142)
    at null.<anonymous> (chrome-extension://mgijmajocgfcbeboacabfgobmjgjcoja/content_js_min.js:18:417)
    at chrome-extension://mgijmajocgfcbeboacabfgobmjgjcoja/content_js_min.js:1:182
    at miscellaneous_bindings:288:9
    at chrome.Event.dispatchToListener (event_bindings:390:21)
    at chrome.Event.dispatch_ (event_bindings:376:27)
    at chrome.Event.dispatch (event_bindings:396:17)
    at Object.chromeHidden.Port.dispatchOnMessage (miscellaneous_bindings:254:22) event_bindings:380
GET website url here (Internal Server Error)