Results 1 to 2 of 2

Thread: Crawler Marquee not working in IE

  1. #1
    Join Date
    Jan 2016
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Crawler Marquee not working in IE

    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%2...newsevents.php

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Get rid of the red (in the below) trailing commas (two places that I see) : (technically illegal, only IE enforces that though)

    Code:
    <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:

    Code:
    {
    	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:

    Code:
     {
    		'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.
    Last edited by jscheuer1; 03-04-2016 at 02:45 AM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Text and Image Marquee Crawler v1.53 - Need Help, Change direction
    By KimmieBlob in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 08-20-2013, 05:05 PM
  2. Text and Image Marquee Crawler v1.53 help please
    By rlhenryjr in forum Dynamic Drive scripts help
    Replies: 23
    Last Post: 03-22-2013, 03:22 AM
  3. Centering Image marquee crawler issue
    By fankfulpixy in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 01-17-2011, 07:56 AM
  4. Crawler (no gap marquee) Javascript...
    By lasa2 in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 08-22-2010, 09:19 PM
  5. DD Text and Image Crawler marquee style to CSS
    By john7p in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 08-17-2010, 03:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •