Hi!
I have a xml file that changed when i update some values, and i'm trying to read it from javascript in asp.net.
But once i run the project, every time i try to read the xml file, the file is the same from the begining...
this is my javascript code that i have in server side
script = "function OnClientDragEnd(dock, args)" +
"{" +
" req = false; " +
" var isIE = false;" +
// branch for native XMLHttpRequest object
" if(window.XMLHttpRequest && !(window.ActiveXObject)) {" +
" try {" +
" req = new XMLHttpRequest();" +
" } catch(e) {" +
" req = false;" +
" }" +
// branch for IE/Windows ActiveX version
" } else if(window.ActiveXObject) {" +
" try {" +
" req = new ActiveXObject('Msxml2.XMLHTTP');" +
" } catch(e) {" +
" try {" +
" req = new ActiveXObject('Microsoft.XMLHTTP');" +
" } catch(e) {" +
" req = false;" +
" }" +
" }" +
" }" +
" if(req) {" +
" req.onreadystatechange = function(){processReqChange(dock,args)};" +
" req.open('GET', 'Config.xml', false);" +
" req.send('');" +
" }" +
"}" +
"function processReqChange(dock,args) {" +
// only if req shows "loaded"
" if (req.readyState == 4) {" +
// only if "OK"
" if (req.status == 200) {" +
// ...processing statements go here...
" var iiii = req.responseXML.getElementsByTagName('Object');alert(iiii.length);" +//Value stays the same after xml have changed
" } else {" +
" alert('There was a problem retrieving the XML data: ' + req.statusText);" +
" }" +
" }" +
"}";
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "PositionChanged", script, true);
This code is in http://developer.apple.com/internet/webcontent/xmlhttpreq.html
What do i need to do for get always the xml file updated