In FF and all, my javascript works fine. But in Chrome it gives this message:
Resource interpreted as script but transferred with MIME type text/plai
I was having the same issue when trying to change a background images in a array through javascript (jQuery in this case).
Anyway.
Instead of this:
m.setStyle('background-image','url(/templates/site/images/style5/'+backgs[i]+')')
do this:
eval("m.setStyle('background-image','url(/templates/site/images/style5/'+backgs[i]+')')");
Chrome javascript gets screwed when trying to parse a variable inside an element structured with ' . In my case it stopped just before the image array being inserted. Instead of parsing the image url + image name (inside the array), it was parsing just the image url.
You probably need to search inside the code and see where it happens. FF, IE and all other don't have this problem.