0

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?

rahul
  • 184,426
  • 49
  • 232
  • 263
  • Suggestion 1: http://stackoverflow.com/questions/5753758/ie-compatibility-mode-forced-in-ajax-code Suggestion 2: http://stackoverflow.com/questions/2921955/ie8-compatibility-mode-wont-load-my-ajax-content Suggestion 3: http://jwcooney.com/2011/12/05/internet-explorer-compatibility-mode-breaks-jquery/ – dotchuZ Jul 02 '13 at 11:16
  • Are the above mentioned questions anyway related to this one? – rahul Jul 02 '13 at 11:26
  • yes. ajax + compatibility mode doesnt load data, give it some effort and google or search SO. -1 – dotchuZ Jul 02 '13 at 11:29
  • I am sure that data is getting returned after the ajax call, but the problem is that I am not able to extract details from that. – rahul Jul 02 '13 at 11:30
  • your js is wrong (but originally your question was about the compatbility mode, what is it now? access problem or IE problem??) are you trying to save the complete array text 1-3 or are you trying to get value 1 2 and 3 ... you can use functions like .text(); ... e.g. like var riable = $(this).find("text").text(); – dotchuZ Jul 02 '13 at 13:00

1 Answers1

0

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

Thanks, Rahul

rahul
  • 184,426
  • 49
  • 232
  • 263