hello. i have a script that loads content into a div. it works in firefox but not IE. i have debugged and determined where it stops working, i just don't know why it ain't working. here is the code:
function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
// stops working here
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
//alert('test');
}
page_request.open('GET', url, true)
page_request.send(null)
}
can anybody provide a solution please.
thanks in advance
function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
// stops working here
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
//alert('test');
}
page_request.open('GET', url, true)
page_request.send(null)
}
can anybody provide a solution please.
thanks in advance