SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict Phidev's Avatar
    Join Date
    Oct 2008
    Location
    Texas
    Posts
    204
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unexpected Symbol in IE7, but works in FF and Safari

    Hi there,

    I am having a problem with internet explorer 7. I am working on a site that maps google maps to show .gpx files, and it is working fine in IE8, firefox (v2 and 3) and safari.

    However in IE 7 i am getting the following error when running the following line

    Code JavaScript:
    $(document).ready(function() { initialize(); $("#player_controls a img").tooltip(); });

    Line: 45
    Error: Expected Identifier, string or number;

    The funny thing is that initialize is a clearly and previously defined function, I had some problems before with IE due to variables being out of scope, so I am afraid this may be something related, but I am not very familiar with IE inner workings so, please help

    Here is a link to the offending page.

    http://geobetty.com/rides/el-paso-tx...-to-shortcut-5

    Thanks for your help!

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,198
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    The error is associated with an extra , been declared, the error indeed lies on line 45 because there is an extra comma at the end of

    Code JavaScript:
    title: "Start Point",

    should be

    Code JavaScript:
    marker = new google.maps.Marker({
        position: new google.maps.LatLng(31.914103031158447,-106.51695996522903),
        map: map,
        icon: "/images/bike-icon.png",
        title: "Start Point"
    });

  3. #3
    SitePoint Addict Phidev's Avatar
    Join Date
    Oct 2008
    Location
    Texas
    Posts
    204
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SgtLegend,

    Thanks for your help. It is funny how picky IE can be. Do you mind if I ask you what kind of tools are available to debug javascript in IE7 or below?

    The error message that I get is not very descriptive, nor useful.

    Thanks again.

  4. #4
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,198
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Usually because IE sucks so bad with error reporting i copy the error into Google and search it but because i have known about this error for a while now i already knew where to look

  5. #5
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


Tags for this Thread

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
  •