HELP! JQuery - Firefox works, IE doesn't

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
PhxVyper
Forum Newbie
Posts: 1
Joined: Mon May 26, 2008 12:32 pm

HELP! JQuery - Firefox works, IE doesn't

Post by PhxVyper »

: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:

Code: Select all

 
 
        $.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:

Code: Select all

 
<?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:

Code: Select all

var content = parseXML(html,"response");
instead of:

Code: Select all

var content = $(tmp).find('response').html();
Content type is text/html (I don't want it to handle like xml)

Help???

Thanks!
Chad
Post Reply