@moiseszaragozaauthorJun 13.2007 — #what i have now is a asp function reading the file and passing it to JS in a response. write()
but it's not really working properly
[CODE] <% call readFile() %>
<% sub readFile()
dim fs,f,ts set fs=Server.CreateObject("Scripting.FileSystemObject") Set f=fs.GetFile("pathmyXML.xml") Set ts=f.OpenAsTextStream(1)
Response.Write("<script language='javascript'>") 'Response.Write(" ReturnXml2('String literal') ") 'Response.Write(" setTimeout(ReturnXml2('ts.ReadAll'), 5000); ") ' This works Response.Write(" setTimeout(ReturnXml2('"&ts.ReadAll&"'), 1000); ") Response.Write("</script>") 'Response.Write(ts.ReadAll)
ts.Close set ts=nothing set f=nothing set fs=nothing
end Sub
%>
[CODE]
<script language="javascript"> function saveXml (myText) { var url2 = 'saveFile.asp'; var xmldoc="xmldoc="+encodeURI(myText); if (window.XMLHttpRequest) { // Mozilla objHTTP=new XMLHttpRequest(); } else if (window.ActiveXObject) { //IE objHTTP=new ActiveXObject('Microsoft.XMLHTTP'); }