studiofaca Posted August 6, 2006 Posted August 6, 2006 <%'Load XMLset xml = Server.CreateObject("Microsoft.XMLDOM")xml.async = falsexml.load("http://www.w3schools.com/xsl/cdcatalog.xml")'Load XSLset xsl = Server.CreateObject("Microsoft.XMLDOM")xsl.async = falsexsl.load("http://www.w3schools.com/xsl/cdcatalog.xsl")'Transform fileResponse.Write(xml.transformNode(xsl))%>How I can load XML file with another server?The some problem with...<html><body><script type="text/javascript">// Load XML var xml = new ActiveXObject("Microsoft.XMLDOM")xml.async = falsexml.load("http://www.w3schools.com/xsl/cdcatalog.xml")// Load XSLvar xsl = new ActiveXObject("Microsoft.XMLDOM")xsl.async = falsexsl.load("http://www.w3schools.com/xsl/cdcatalog.xsl")// Transformdocument.write(xml.transformNode(xsl))</script></body></html>P.S. Only on local computer it works!?!?Can you help me? Thank you forward.
boen_robot Posted August 7, 2006 Posted August 7, 2006 Depends on what you mean by "another server".JavaScript can't access resources on another server. It's a security feature.Server side scripting languages like ASP (the first examlpe you gave) can. So what's the problem? That first example doesn't work on your IIS server or do you mean how can you achieve the same effect with another server side scripting language?
studiofaca Posted August 7, 2006 Author Posted August 7, 2006 Aham. Ok.> Depends on what you mean by "another server".Example:You host test.asp on this server. On another server you will host .xml files and you like to use something like that """"xml.load("http://www.w3schools.com/xsl/cdcatalog.xm"")"""".> JavaScript can't access resources on another server. It's a security feature.Meybe this is.Thank you!
boen_robot Posted August 9, 2006 Posted August 9, 2006 I said JavaScript... on the client side... you're using ASP... server side=> you can do it.As for why it doesn't work... I don't know. I'm not much into ASP.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now