1

I am using noConflict() function within a template page on a Magento site and I'm pretty sure my code is in the correct order on the following page (view page source): http://animalnecessity.com/company/where-to-buy. The script is working on all major browsers except for IE7 the clickable maps do not show up at all and in IE9 you cannot click on the maps. I am receiving the following error in IE7: SCRIPT1028: Expected identifier, string or number where-to-buy, line 245 character 4 which is pointing to the second to last line of this block:

J(function(J)   
            {       
                J('#map-usa').cssMap(       
            {           
                'size' : 960,           
                'tooltips' : 'floating',            
                'cities': false,                    
            });     
            }); 
CaitlinHavener
  • 779
  • 2
  • 20
  • 42

2 Answers2

4

Remove the last comma. IE has problems decoding JSON when a last comma is appended.

So your JSON part has to look like that:

{           
        'size' : 960,           
        'tooltips' : 'floating',            
        'cities': false                 
}
Tobias
  • 2,647
  • 18
  • 24
4

The JSON specification does not allow a trailing comma. The following code contains error:

'cities': false,

It must be:

'cities': false
Kirill
  • 91
  • 6