Jump to content

XMLHttpRequest to load XML documents


ShivaPrasadm

Recommended Posts

if you mean you want to use ajax to get xml document, yes you can do that. did you check the ajax tutorials?

Edited by birbal
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...