You are using the xmlhttp object in
synchronous
mode. XmlHttp is meant for
asynchronous
access. You'll have to register an
event handler
for when the response has been received from the webserver, instead of trying to immeadiately reading the response after calling
send
. The reson it worked locally from the file system is most likely due to that the delay is so small that you wouldn't notice it. You can use the
onreadystatechanged
event of the XmlHttp object.
For a simple example on asynchronous usage see here:
http://de.wikipedia.org/wiki/XMLHttpRequest[
^].
Better yet, use a library for your Ajax needs like
jQuery[
^] for instance.
Cheers!
—MRB