2

i have an asp.net-mvc site and i am getting weird behavior in internet explorer 7 on one page where the html result of an ajax call isn't showing up on the screen. This works perfect in Firefox, Chrome and IE8.

I first thought it was ajax related but to simplify and isolate the issue i got this to NOT work in IE7

$("#cupcakeOfMonthYear").live("click", function () {

       $('#cupcakeOfMonthCalendar').html("ffffff");
 });

Again, this works perfect in Firefox, Chrome and IE8 but when i change to compatibility mode to get the IE7 experience, the whole div area goes blank (instead of refreshing with the updated html).

Is this a bug in IE7?

rene
  • 41,474
  • 78
  • 114
  • 152
leora
  • 188,729
  • 360
  • 878
  • 1,366

2 Answers2

2

i figured out the issue. i was calling

.html(data)

on the table selector itself and it seems like IE7 doesn't like this. i put a div surrounding the table and when the table came back from the ajax call. i called

.html(data) 

on the outer div and that worked fine. It actually makes sense as .html() doesn't seem to include the outer html but i guess all modern browsers figure it out and do the right thing anyway.

leora
  • 188,729
  • 360
  • 878
  • 1,366
0

Which jquery blocking library (and which version) are you using ?

I mostly know of blockUI

Which seems to have a related SO post on your problem.

Community
  • 1
  • 1
Nicolas Modrzyk
  • 13,961
  • 2
  • 36
  • 40
  • i removed the blockUI code from the question as i tested after removing this code and it still didn't work – leora Aug 29 '11 at 04:39
  • what's in the 'data' content when you use IE7 ? – Nicolas Modrzyk Aug 29 '11 at 04:50
  • i updated my question at the end regarding the data. I hard coded the response to some simple text and it still doesn't work in IE7. ie8, ff and chrome is fine – leora Aug 29 '11 at 05:02
  • now i just did some more testing and it has nothing to do with ajax call. if all i do in the event handler is: $('#cupcakeOfMonthCalendar').html("ffffff"); it still doesn't work in IE7. i have updated the question to be simpler now that i have this isolated – leora Aug 29 '11 at 05:06
  • in that case, would [that help](http://stackoverflow.com/questions/5178507/jquery-html-not-displaying-any-data-in-ie7-but-ie8-works) – Nicolas Modrzyk Aug 29 '11 at 05:40
  • i added an answer as i figured out why IE7 was causing an issue – leora Aug 29 '11 at 12:02