function showFeeds(url, id, actionId, ContId) {
var xhr;
var rssfeed = url;
//call the right constructor for the browser being used
if (window.ActiveXObject)
xhr = new ActiveXObject("Microsoft.XMLHTTP");
else
if (window.XMLHttpRequest)
xhr = new XMLHttpRequest();
else
alert("AJAX request not supported");
//prepare the xmlhttprequest object
xhr.open("GET", rssfeed, true, "some_user", "some_password");
xhr.setRequestHeader("Cache-Control", "no-cache");
xhr.setRequestHeader("Pragma", "no-cache");
xhr.onreadystatechange = function(){
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (xhr.responseText != null) {
processRSS(xhr.responseXML, id, actionId, ContId, url);
}
else {
mwl.insertHTML( '#container_home', "Failed to receive RSS file from the server - response text is null." );
return false;
}
}
else {
mwl.insertHTML( '#container_home', "Error code " + this.status + " received: " + this.statusText );
}
}
}
//send the request
xhr.send(null);
}