views:

222

answers:

1

Hi,

I have an issue where my jQuery script reports followign error in Internet Explorer 8

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.4; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; MS-RTC LM 8; MS-RTC EA 2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Mon, 24 May 2010 12:36:55 UTC


Message: Object doesn't support this property or method
Line: 20
Char: 49
Code: 0

My jQuery script is using JQuery UI library v1.8. I am displaying a modal popup dialogue. The contents of the dialogue box is taken from a text file located in the server and i am reading the content using $.ajax() call.

The functionaliy is not affected even when i open the page in IE6/7/8. But above javascript error is shown when i open the page in IE8, When I change the mode to IE7 it works great (Tools --> Developer Tools --> Browser Mode IE7).

Does anyone has resolution to this. Some of the posts suggested using latest version of jQuery UI library. But i have been using it already.

Plase help....

A: 

I'm guessing a trailing comma in an object or list of parameters. FF/Webkit is more forgiving of this kind of thing.

example

$('#navigation p').css({
    'color' : '#000000',
    'font-size' : '10px',
})

should be

$('#navigation p').css({
    'color' : '#000000',
    'font-size' : '10px'
})
calumbrodie
IE8 is fine with trailing commas. It's IE6/7 that choke on them.
R. Bemrose