jeudi 20 avril 2017

Having an issue with Javascript getElementsByTagName on chrome

Am a new bee to web development. I know it is not a brand new question but was not able to make it work with available answers. Am having an issue with getting xml tag name length in chrome browser. when I try this getElementsByTagName("auth:accountInfo") it is working fine on FF but not working on chrome. If i use getElementsByTagName("accountInfo") it is working on chrome but it is not working on FF. Can some one help me in writing correct logic which works on both browsers. Thanks in advance. Below is my sample code.

objXHR = XMLHttpRequest()
if(objXHR.status == 200)
        {
            var accountInfo = objXHR.responseXML.getElementsByTagName("auth:accountInfo");
            if (accountInfo.length > 0)
            {
                // do something
                }




Aucun commentaire:

Enregistrer un commentaire