jqueryie-compatibility-mode

jQuery .find() not returning value when IE in Compatability mode


I am using an ajax call to fetch details in XML format. datatype is set as XML in jquery.ajax.

Output ajax response is

<FilterData>
    <DataValue>
        <text>1</text>
        <text>2</text>
        <text>3</text>
    </DataValue>
</FilterData>

responseXML variable is having the response from jquery ajax.

var response = $(responseXML).find("DataValue");

response.length is > 0 when IE is not in compatability mode. But it is 0 when the page is in compatability mode.

I am looking for a way in which I don't have to forcefully change the browser mode.


Any suggestions?


Solution

  • Earlier the data returned was in XML format. Now changed it to json and it works fine.

    Thanks, Rahul