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("<b>'+title+'</b><br><br>'+description+'<br><br>Read more...</a>'; document.getElementById("div_feed_item").innerHTML = htmlCode; } else { alert(strOutput); } xmlHttp = null; } }
(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.