I'm using AJAX to update page content. In my page callback I have a few commands and end with ajax_render().

When I click the AJAX link from another page, the content updates, all my JS and CSS for that page are added, and everything works perfectly. However, the CSS is not being applied in IE.

It appears that the following two lines in ajax.js are causing the problem:

var new_content_wrapped = $('<div></div>').html(response.data);
var new_content = new_content_wrapped.contents();

If I hack ajax.js and change (line 519):




it works!! Any ideas?


The solution for me was CSS aggregation in Drupal: It needs to be on to work.
When it is disabled, it uses @import, which IE does not like if that is used to append to the head. When it is enabled, it appends links instead, which then works with IE.

The same problem is described here.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.