469,602 Members | 1,940 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

XMLDOM, the System.Xml namespace and refreshing data

BCM
In ASP 3, I once did a page using javascript and XMLDOM that loaded up xml
files, displayed their data, and automatically refreshed that data at 10
second intervals (not a whole page refresh: just the data in the particular
node I wanted to display). The javascript looked something like:

function GetData()

{

xmldoc = new ActiveXObject("Microsoft.XMLDOM");

xmldoc.load("c:\\myxmldoc.xml");

}

function Update()

{

var myLabelText =
(xmldoc.getElementsByTagName("TimeStamp").item(0). text);

idMyLabel.innerText = myLabelText;

}

function Init()

{

GetData();

setInterval(GetData(),9000); //grab the xml doc every 9 seconds

setInterval(Update(),10000); //update the html with the data it contains
every 10 seconds

}

Then, in the HTML form, I would just call Init() during the body onLoad
event.

Surely there is a similar technique in ASP.NET using the System.XML
namespace, but after a day and a half I wave the white flag! Any
suggestions? Thanks in advance!

Nov 22 '05 #1
0 1058

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mike Labman | last post: by
3 posts views Thread by Robert Zurer | last post: by
3 posts views Thread by Yair Cohen | last post: by
reply views Thread by Jim Duffie | last post: by
2 posts views Thread by =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= | last post: by
2 posts views Thread by =?Utf-8?B?YzY3NjIyOA==?= | last post: by
1 post views Thread by Dave Harkness | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.