<script language="javascript">
function window.onload()
{
setTimeout("getXmlData()",1000);
}
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
function getXmlData()
{
xmlhttp.open("GET","getXml.asp",false);
xmlhttp.send();
if (xmlhttp.status == 200)
{
var newdoc = xmlhttp.responseXML;
var nodes = newdoc.documentElement.childNodes;
for (var i=0; i < nodes.length; i++)
xmldoc.documentElement.appendChild(nodes[i].cloneNode(true));
//mytable.refresh();
}
else
{
alert("something is wrong:" + xmlhttp.statusText);
}
setTimeout("getXmlData()",1000);
}
</script>
2. getxml.asp
<%
'get data from the database here
Response.ContentType="text/xml"
sXML = "<people><person><name>a</name><age>12</age></person><person><name>b</name><age>24</age></person></people>"
Response.Write(sXML)
%>
very difficult to do a PUSH, you have to refresh the page periodically to retrieve the new data or if you don't like refreshing, you can use remote scripting or XMLHTTP to retrieve any new data periodically and update the page using DHTML