I've been using XMLHttpRequest for a while, like many others, but for some reason this bit of code stops just after
Code:
http = sendUsingGET(...
Code:
// XMLHttpRequest functions
function createRequest() {
	var req; 
	var browser = navigator.appName; 
	if (browser == "Microsoft Internet Explorer") {
		req = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		req = new XMLHttpRequest();
	}
	return req;
}

function sendUsingGET(target, args) {
	var http = createRequest();
	var st = target + '?' + args;
	http.open('GET', st, true);
	http.onreadystatechange = function () {
		if (http.readyState == 4) {
			return http.responseText;
		}
	}
	http.send(null);
}
// Loads new stickies and shows them with XMLHttpRequests
// you *MUST* load ajax.js before this script is run
function getNewElems(since, frameDiv) {
	//'since' is the value of a hidden field which will get updated at the end of this transaction
	//since should be a UNIX style timestamp, set when the page is loaded
	var when = 'time=' + since.value;
	http = sendUsingGET('http://127.0.0.1/mrgrapefruit/lib/get.php', when);
	alert(http);
	returnedElems = http.split("<!>");
	frameDiv.innerHTML = frameDiv.innerHTML+returnedElems[0];
	timestamp = new Date();
	since.value =  timestamp.getTime();
	ADD_DTML(returnedElems[1]);
}
Basically, get.php returns a bunch of HTML, followed by the final line, which starts with <!> and then lists a bunch of properties I need to pump back into JavaScript. I think this script fails at sendUsingGET because alert(http) doesn't get called. Any ideas?

Thanks,

mrgrapefruit