Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

AJAX shoutbox help


nanoymaster's Avatar
the master of nanoy(.org)
0 0

would anyone be kind enough to help me with my AJAX shoutbox which isn't working.

It posts to the shoutbox but it doesn't display the shouts.

function showData() {
	htmlRequest = ajaxFunction();
	if (htmlRequest==null){ // If it cannot create a new Xmlhttp object.
		alert ("Browser does not support HTTP Request");
		return;
	} 

	htmlRequest.onreadystatechange = function(){
		if(htmlRequest.readyState == 4){
			document.getElementById("shoutarea").innerHTML = htmlRequest.responseText;
		}
	}
	htmlRequest.open("GET", "http://www.nanoy.org/AjaxShoutbox/outputinfo.php", true);
	htmlRequest.send(null);
}

thats the bit I think is wrong. any help would be nice! (pm me if you wan't the url. or for my MSN addy

cheers in advance


korg's Avatar
Admin from hell
0 0

You didn't post the whole code but what i see is it's not closed (didn't give the next line in your shot) The next line should read "showData();" To finish the display.