Thanks for your help. After I understood the problem I have found a solution that works for me. I just send another Ajax request to the server, that gives me the content in plan HTML ;-)
> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Harald Dietrich > Sent: Freitag, 9. Februar 2007 16:31 > To: jQuery Discussion. > Subject: Re: [jQuery] Problem with IE (Ajax + XML fragments) > > > I thought the .html() function does not work on XML > documents. Your example does not work either. Besides that > you mixed up "content" and "bar" for the each loop ;-) > > > -----Original Message----- > > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > > Behalf Of Christof Donat > > Sent: Freitag, 9. Februar 2007 16:01 > > To: jQuery Discussion. > > Subject: Re: [jQuery] Problem with IE (Ajax + XML fragments) > > > > > > Hi, > > > > > Expected Result: The <div> element should be append by a > > <span>Test</span> > > > element. Firefox: OK > > > IE 6: not OK (the Ajax request will return an error). The > > error is produced > > > in the .append command. > > > > Your span Element belongs to another DOM-document than your > > div. In that case > > jQuery should clone the Node and append the clone. Firefox > > silently changes > > the ownerDocument for the clone when it is appended, IE > > doesn't. IE finds out > > that the node belongs to another document and fails. The > > solution could be to > > use importNode() if IE would support it - it doesn't. > > > > The only Way I found to handle that problem would be: > > > > $.get("test.xml", function(xml) { > > var bar = $("bar", xml); > > var content = ''; > > content.each(function() { > > content += $(this).html(); > > }); > > $(".test").html(content); > > }); > > > > I am not shure if that works in your case, but you might > whant to try. > > > > Christof > > > > _______________________________________________ > > jQuery mailing list > > [email protected] > > http://jquery.com/discuss/ > > > > _______________________________________________ > jQuery mailing list > [email protected] > http://jquery.com/discuss/ > _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
