ShivaPrasadm Posted June 27, 2012 Share Posted June 27, 2012 Hi i am new to the XSLT coding.I am trying to load a XML document in XSL, I am using IE8 to display the HTMLmy question is can i use the "XMLHttpRequest" object to read data from XML. Thank you for your help and valuable time RegardsShiva Link to comment Share on other sites More sharing options...
birbal Posted June 27, 2012 Share Posted June 27, 2012 (edited) if you mean you want to use ajax to get xml document, yes you can do that. did you check the ajax tutorials? Edited June 27, 2012 by birbal Link to comment Share on other sites More sharing options...
ShivaPrasadm Posted June 28, 2012 Author Share Posted June 28, 2012 We can use the below methods to load an XML file to XSL code.In documents i found that 1st method can be used for any advanced browser. second one for IE 5 and older but i dont want to use activeXobject in my project, So can i use the 1st method for IE6 and above. Will there be any effects if i use ist method in IE? 1)var xmlhttp=new XMLHttpRequest()2)var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP") Link to comment Share on other sites More sharing options...
birbal Posted June 28, 2012 Share Posted June 28, 2012 example from http://w3schools.com/ajax/ajax_xmlhttprequest_create.aspvar xmlhttp;if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }bold part will check if that object exist or not if it does not (in ie5/6) it will execute else part. Link to comment Share on other sites More sharing options...
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