I am trying to refresh part of my page using ajax and it works fine in FireFox but when I test it IE I get an error at "document.getElementById('ipb_table_reload').innerHTML = response;" which says "Unknown runtime error" the webpage can be found here. I have tried googling this error and everything I found didn't seem to help and I am really at a loss so any help would be must appreciated.

var inc = 0;
var reopen = 0;
function createRequestObject() 
{
	var req;
	if(window.XMLHttpRequest)
	{
		req = new XMLHttpRequest();
	} 
	else if(window.ActiveXObject) 
	{
		req = new ActiveXObject('Microsoft.XMLHTTP');
	} 
	else 
	{
		alert('Your Browser Does Not Support This Script - Please Upgrade Your Browser ASAP');
	}
	return req;
}

var http = createRequestObject();

function sendRequest(page) 
{
	http.open('get', page);
	http.onreadystatechange = handleResponse;
	http.send(null);
}

function handleResponse() 
{
	if(http.readyState == 4 && http.status == 200)
	{
		var response = http.responseText;
      		if(response) 
      		{
			document.getElementById('ipb_table_reload').innerHTML = response;
			var loading = document.getElementById('ajax_loading');
			loading.style.display = 'none';
      		}
	}
	else
	{
		var loading = document.getElementById('ajax_loading');
		loading.style.display = 'block';
	}
}

function repeatloop()
{
	if(inc > 0)
	{
		for(var i=1;i<=8;i++)
		{
			var eopen = document.getElementById(i);
			if(eopen.style.display == 'table-row')
			{
				reopen = eopen.id;
			}
		}
	}
	sendRequest('http://www.trident-gaming.net/forums/index.php?app=ccs&module=pages&section=pages&id=29&load=load&reopen='+reopen);
	setTimeout('repeatloop()', 10000);
	inc = 1;
}

window.onload=function() 
{
	repeatloop();
}

Thanks, it works perfectly now.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.