HELP! JQuery - Firefox works, IE doesn't
:banghead:
Hi,
I'm writing some code using JQuery (love it), and I'm running into some problems with it not working in IE. here's the snippet of code where I'm stuck currently:
-
$.ajax({
type: 'GET',
dataType: 'html',
data: 'method=getCategories&cat_id=0&sub_cat_id=0&no_javascript=1&genre_select_box_only=0&t' + new Date().getTime(),
url: '/service/index_dev.php',
success: function(tmp) {
var content = $(tmp).find('response').html();
$('#cat_list_content').html(content.replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&')).change( function() {
/** more code here **/
});
}
});
Okay, so in Firefox, this works perfectly well. In IE, it won't process $(tmp).find('response') and $(tmp).find('response').html() returns NOTHING.
tmp contains:
-
<?xml version="1.0"?>
<fff_services><status id="80001" method="getCategories"/><response>response content here</response></fff_services>
The only way I can get it to work in IE is to use:
-
var content = parseXML(html,"response");
instead of:
-
var content = $(tmp).find('response').html();
Content type is text/html (I don't want it to handle like xml)
Help???
Thanks!
Chad