Solve the problem that the Firefox browser does not support Ajax's transport. responsexml method.

Source: Internet
Author: User

If (window. activexobject) return New activexobject ('Microsoft. xmlhttp ')
Else if (window. XMLHttpRequest) return New XMLHttpRequest ()
AboveCodeThe IE browser uses new activexobject ('Microsoft. XMLHTTP ') returns an XMLHTTP instance, while in Firefox, new XMLHttpRequest () is used to return an asynchronous request object instance. If you need to retrieve the XML returned by them, the call methods of the two are different, the former uses the responsexml attribute to return, while the latter uses the responsexml attribute to both use the responsetxml value, but ie supports responsexml while FF does not, in addition, the Firefox technical support page is recommended for this purpose:
VaR parser = new domparser ();
Xml = parser. parsefromstring (transport. responsetext, "text/XML ");

In addition, the value returned by responsexml is used in Firefox. The selectnodes and selectsinglenode methods are not supported. Only the getelementsbytagname method can be used.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.