4

Just upgraded to the RC of IE9 and found that my web pages using jQuery Templates are not rendering the template content.

Pages work fine when I switch to IE8 Browser Mode in the Developer Tools (and Safari, FF, etc).

Anyone got any ideas?

FloatLeft
  • 1,317
  • 3
  • 23
  • 40
  • Care to be more cryptic? What exactly doesn't work? Give us an error or a stack trace. A test case would be nice too. We can't guess what's wrong. – the_drow Feb 15 '11 at 13:50
  • Seconding the request for a test case. I just threw together something quick in jsFiddle and it seems to work fine. – Sapph Feb 15 '11 at 13:54
  • Hi to you both. Youre right, its not the jQuery Templates thats causing the problem. Rather, the browser is choking on some preceeding script. The Developer Tools debugger is showing the following: SCRIPT438: Object doesn't support property or method 'getElementsByTagName' jquery.min.js, line 16 character 59007 SCRIPT438: Object doesn't support property or method 'getElementsByTagName' jquery.min.js, line 16 character 59007 SCRIPT5007: Unable to get value of the property 'setDefaults': object is null or undefined qform.js, line 199 character 5 – FloatLeft Feb 15 '11 at 14:11
  • line 199 looks like this: $.datepicker.setDefaults({ showOn: 'both', buttonImageOnly: true, buttonImage: '/Content/Img/calendar.png', buttonText: 'Calendar', dateFormat: 'dd/mm/yy', minDate: 0, maxDate: 365 }); – FloatLeft Feb 15 '11 at 14:13
  • If I remove the datepicker code, then the page renders fine. This problem only affects IE9. – FloatLeft Feb 15 '11 at 14:14
  • Update: Reverting back to jQuery 1.4.4 (from 1.5.0) fixes the problem. – FloatLeft Feb 15 '11 at 14:20
  • Update: This is a known bug - http://bugs.jquery.com/ticket/8052 – FloatLeft Feb 15 '11 at 15:34

5 Answers5

6

There is now a RC version of jQuery v1.5 - here That should fix your problems with jQuery on IE9 RC. Full version of jQuery 1.5.1 is due to be released very soon.

Ryano
  • 2,125
  • 3
  • 20
  • 28
4

The issue was caused by a bug in jQuery 1.5 when running on an IE9.

The only way to get this working is to wait until the release of jQuery 1.5.1

See: http://bugs.jquery.com/ticket/8052

FloatLeft
  • 1,317
  • 3
  • 23
  • 40
1

Check your code for usage of .text(), .contents() and replace those with .html().

IE has problems with those functions, only reliable way to grab content seems to be .html(): http://www.bennadel.com/blog/1829-Script-Tags-jQuery-And-Html-Text-And-Contents-.htm

ezmilhouse
  • 8,933
  • 7
  • 29
  • 38
0

It might be fixed but is still an issue via asp.net!

  • Please, try to read this http://stackoverflow.com/about, to get more understanding about questions/answers here on SO. Your contribution is not answering the question. It is more a comment, which you can add once you'll increase your reputation: http://stackoverflow.com/faq#reputation – Radim Köhler Sep 17 '13 at 10:32
0

This problem has been fixed at latest version of jQuery. Upgrade to 1.5.1

HasanG
  • 12,734
  • 29
  • 100
  • 154