dvera
03-03-2016, 06:17 PM
1) Script Title: Text and Image Crawler v1.53
2) Script URL (on DD):
3) Describe problem:
Text and image crawler not working in IE. It does work in chrome, but not in IE. Can i get some help here? thank you in advance.
http://www.cityofedinburg.com/Copy%20of%20newsevents.php
jscheuer1
03-03-2016, 06:52 PM
Get rid of the red (in the below) trailing commas (two places that I see) : (technically illegal, only IE enforces that though)
<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler2',
style: {
'padding': '0px;',
'width': '100%;',
},
inc: 5, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 2,
neutral: 150,
savedirection: true,
random: false,
});
</script>
Commas are only really allowed between elements in an object or array, never after the last one.
More explanation:
This:
{
uniqueid: 'mycrawler2',
style: {
'padding': '0px;',
'width': '100%;',
},
inc: 5, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 2,
neutral: 150,
savedirection: true,
random: false,
}
Is an object bounded by opening and closing braces {}. The last element in it is random: false - so technically no comma may follow that.
Within that object is (in this case) the style object:
{
'padding': '0px;',
'width': '100%;',
}
Again bounded by braces {} (a frequent, though not exclusive convention for javascript objects). It's last element is 'width': '100%;' - so again, technically no comma may follow that.
Your page would probably be alright in current IE (IE 11 I think, the last IE before MS migrated to something else as a browser). However, your page has a meta tag that forces IE to interpret things as if it were IE 7, back when strict interpretation of commas in these situations was enforced.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.