Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JavaScript errors in IE - expected ';' & 'position().left' is null

    this is where the code is of the the second error http://jsfiddle.net/ghAkB/10/

    got two errors in IE I think it might be number 8 version.This function is working perfectly on all browsers why does IE marks an error,I simply don´t get it, all I can see is that there is no way out until it's fixed Please help me, there must be a minor glitch causing the error that is clearly invisible...

    These are the errors, I would appreciate if someone can help me. I'm getting confused with the script.

    First error

    Message: Expected ';' Line: 57 Char: 9 Code: 0 ----this is the line 57 referring to "jquery-1.3.1.min.js" call script which is located in the index.html

    Second error

    Message: 'position().left' is null or not an object Line: 44 Char: 5 Code: 0 which is this Line 44 - which is located within the script:

    $magicLineTwo

    this is the entire code of the script there's nothing more in this script, there are two sets for this marked as " example 1 and example 2 "and the second one is making the problem:

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,603
    Thanks
    80
    Thanked 4,634 Times in 4,596 Posts
    Well, just for starters, you are including jQuery *TWICE* in your code:
    Code:
    <script src="js/jquery-1.3.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js?ver=1.3.2'></script>
    And they aren't even the same version.

    And in any case those are ANCIENT versions of jQuery!

    Maybe it's time to move from 2009 or so into 2013?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Not just twice but thrice! In the jsFiddle, it has an option to add a library. jQuery 1.6.4 is selected. So if you look at the output pane's source, you will see 3 jQuery files with different versions added!

    You may not be adding thrice in your actual page but just wanted to point this out.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #4
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    Quote Originally Posted by glenngv View Post
    Not just twice but thrice! In the jsFiddle, it has an option to add a library. jQuery 1.6.4 is selected. So if you look at the output pane's source, you will see 3 jQuery files with different versions added!

    You may not be adding thrice in your actual page but just wanted to point this out.
    you beat me to it.

  • #5
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so which one should I download that is updated to replace these two ones? Also would that affect the menu I have?

  • #6
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    also how about the error
    Message: 'position().left' is null or not an object Line: 44 Char: 5 Code: 0

    $magicLineTwo


    In jsfiddle is where the script is located and the appearance of the menu, I would like to keep the same effect of the menu with the line under hover.
    I would deeply appreciate if you can help me with this until I get this sorted the website will never finish I want to suprise my family.

  • #7
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    is it possible that I put two jquery because it might be because there are two functions on the website? or does one actually work for all jquery functions on the page.


  •  

    Posting Permissions

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