topical media & game development
portal-js-ajax-functions.js
function getXmlHttpObject() {
var objXMLHttp = null;
if (window.XMLHttpRequest) {
objXMLHttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {
objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
return objXMLHttp;
}
function dispFeedItem (contentId) {
xmlHttp = getXmlHttpObject();
if (xmlHttp == null) {
alert ("Browser does not support HTTP Request");
return;
}
var url = "classes/core.ajax.php?AjaxAction=DispFeedItem&ContentId="+contentId;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange = dispFeedItemStateChanged;
xmlHttp.send(null);
}
function dispFeedItemStateChanged () {
if (xmlHttp.readyState == 4) {
var strOutput = xmlHttp.responseText;
if ( (strOutput.charAt(strOutput.length - 3) + strOutput.charAt(strOutput.length - 2) + strOutput.charAt(strOutput.length - 1)) == "!@#") {
strOutput = strOutput.substr(0, (strOutput.length-3));
var arrOutput = strOutput.split("
(C) A. Eliëns
2/9/2007
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.