ShivaPrasadm 0 Posted June 27, 2012 Report 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 Quote Link to post Share on other sites
birbal 168 Posted June 27, 2012 Report 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 Quote Link to post Share on other sites
ShivaPrasadm 0 Posted June 28, 2012 Author Report 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") Quote Link to post Share on other sites
birbal 168 Posted June 28, 2012 Report 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.