2

A vendor I work with recently produced a page for my company. It generally runs well, but gets completed mangled when viewed by IE (any version).

Here is are the error details:

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C) Timestamp: Tue, 6 Nov 2012 18:06:55 UTC

Message: Expected identifier, string or number
Line: 82
Char: 1
Code: 0

Here is the section of code I believe it is referring to:

<script type="text/javascript">  
jwplayer("container1").setup({
'flashplayer': "player.swf",
'autostart':"true",
'skin': "skin.zip",
'controlbar': "bottom",
'screencolor': "FFFFFF",
'image': "images/gradient green background.jpg",
'file': "new_tour_video/General_Information_Final2.m4v",
'height': "546",
'width': "999",
 <-----------------*This would be line 82, Character 1*
});

</script>

Can anyone point me in the right direction here?

I know a bit about this (but not much), but it seems like this might be indicating a problem with the script. The only problem is, the player itself works fine. It's the rest of the page that gets disorganized...but why would it tell me the error is on line 82? I checked the associated CSS file, and everything looks normal there (line 82 is a really mundane, properly formatted tag).

In short, I'm stumped. I'm sure someone with a really solid knowledge of Java would be able to figure this out, but my knowledge of proper Java syntax is pretty weak.

Jean-François Corbett
  • 37,420
  • 30
  • 139
  • 188
user1804300
  • 21
  • 1
  • 2

2 Answers2

5

Remove the last comma from the object declaration to fix the error

jwplayer("container1").setup({
'flashplayer': "player.swf",
'autostart':"true",
'skin': "skin.zip",
'controlbar': "bottom",
'screencolor': "FFFFFF",
'image': "images/gradient green background.jpg",
'file': "new_tour_video/General_Information_Final2.m4v",
'height': "546",
'width': "999"
});
Andreas
  • 21,535
  • 7
  • 47
  • 56
1

It looks like your JSON object has an extra comma. Try removing the final comma in the object:

<script type="text/javascript">  
jwplayer("container1").setup({
'flashplayer': "player.swf",
'autostart':"true",
'skin': "skin.zip",
'controlbar': "bottom",
'screencolor': "FFFFFF",
'image': "images/gradient green background.jpg",
'file': "new_tour_video/General_Information_Final2.m4v",
'height': "546",
'width': "999"
});
</script>
Will Shaver
  • 12,471
  • 5
  • 49
  • 64