views:

51

answers:

2

Hi, I got a problem with a script, when I try to load the page in IE7

Link to the website

Expected identifier, string or number zoommap.js, line 126 character 6

This is what is in that line:

    }).appendTo(map).click(function(){

Object doesn't support this property or method setupMap.js, line 6 character 1

This is what is in that line:

        $('#map').zoommap({

I hope that you can help me, I'll really appreciate it. If you need any other info please tell me.

+3  A: 

The first means there is an extra trailing comma in the line above it.

The second is because the first failure causes the zoommap plugin to not initialize.

bcherry
He's right. IE doesn't like commas after procedures.
Adam
+1  A: 

Remember that JavaScript does not support "final commas" in object definitions. So I cannot write:

var obj = {'a': 1, 'b': 2,}

but have to write:

var obj = {'a': 1, 'b': 2}
Mike Axiak
excelent, you are right... ty very much n.n
Omegakenshin
JavaScript does allow it (in the newest edition) and several browsers have allowed trailing commas for quite a while now. Internet Explorer 9 also allows it. IMO it promotes poor coding practices but it's not like I have to use it :-)
Andy E