Menu

#2 Javascript error in IE6

open-invalid
None
9
2001-08-23
2001-08-22
Scamp
No

Reported problem with OnMouseOver in IE6

The erorr was "returntrue" not defined.

If you search the source code, you will find a
string "returntrue", where I belive there should be a
space between "return" and "true".

Discussion

  • Martin Bateman

    Martin Bateman - 2001-08-22

    Logged In: YES
    user_id=110767

    This is actually a problem with javascript and IE. I've seen
    it before on other pages. All the javascript is correct for
    netscape and mozilla but M$ keep changing there defintion of
    what is good or not. I need to know which page and which
    page and which option was creating the error in order to fix
    it.

     
  • Martin Bateman

    Martin Bateman - 2001-08-22
    • assigned_to: mbateman --> scamp
     
  • Scamp

    Scamp - 2001-08-22

    Logged In: YES
    user_id=110805

    Requested more info.

    I think it was on pretty much any menu though.

    Is there the same underlying bit of code anywhere?

    Can you do a grep for "returntrue" and see if there's
    anything obvious?

     
  • Martin Bateman

    Martin Bateman - 2001-08-22

    Logged In: YES
    user_id=110767

    Yip there is a bit of javascript which is copied all over
    the place which does the highlighting, well it used to do
    highlighting of menus until the browsers moved on. I'll
    strip the code out and convert to a CSS method.

     
  • Martin Bateman

    Martin Bateman - 2001-08-22
    • assigned_to: scamp --> mbateman
     
  • Scamp

    Scamp - 2001-08-22

    Logged In: YES
    user_id=110805

    I've got the error details back - don't know if this is
    dealt with by the CSS approach:

    I enter my username and password and submit them. The
    screen goes blank,
    meaning the menu frameset is leading.

    I then get JavaScript runtime errors "Untermianated string
    constant" on
    lines 26, 45, 52, 58, 71. Sadly, the security on the
    system is a bit good,
    and I can isolate and load the page itself outside the
    frame.

    When I choose to debug, the error happens at lines like
    this (which Outlook
    will wrap at 76 cols, so I've indicated newlines):

    <A [newline]
    HREF="userAdmin.cgi" CLASS="cloLink"
    onmouseover="window.status='User
    [newline]
    Administration';return (true);"
    onmouseout="window.status='';return
    true;">User Admin</A> [newline]

    My guess is that javascript is newline sensitive in single
    quoted strings,
    and so the 'User string is unterminated as far as it's
    concerned.

    If I ignore six of these errors, the menu page loads.
    Having loaded, I move
    my mouse over a group name, such as "Democracy". As my
    mous emoves over, I
    get the Javascript runtime error "'returntrue' is undefined
    on line 94.
    Line 94 is a long one, and I quote it in full below (as the
    last part of
    this email). The string "returntrue" does indeed appear on
    this line, and I
    belive it was typed in error.

    <UL> <LI><A HREF="gotoConf.cgi?
    confName=Announcements&view="
    CLASS="cloLink" onmouseover="window.status='Goto
    Announcements';return
    true;"
    onmouseout="window.status='';returntrue;">Announcements</A>
    [Unread 3
    Total 3]</LI> <LI><A HREF="gotoConf.cgi?
    confName=Democracy&view="
    CLASS="cloLink" onmouseover="window.status='Goto
    Democracy';return true;"
    onmouseout="window.status='';returntrue;">Democracy</A>
    [Unread 57 Total
    57]</LI> <LI><A HREF="gotoDictConf.cgi?
    confName=Dictionary&view="
    CLASS="cloLink" onmouseover="window.status='Goto
    Dictionary';return true;"
    onmouseout="window.status='';returntrue;">Dictionary</A>
    [dict.org
    2628]</LI> <LI><A HREF="gotoConf.cgi?
    confName=Food&view="
    CLASS="cloLink" onmouseover="window.status='Goto
    Food';return true;"
    onmouseout="window.status='';returntrue;">Food</A> [Unread
    5 Total 5]</LI>
    <LI><A HREF="gotoConf.cgi?confName=Funnies&view="
    CLASS="cloLink"
    onmouseover="window.status='Goto Funnies';return true;"
    onmouseout="window.status='';returntrue;">Funnies</A>
    [Unread 9 Total
    9]</LI> <LI><A HREF="gotoGameConf.cgi?
    confName=Games&view="
    CLASS="cloLink" onmouseover="window.status='Goto
    Games';return true;"
    onmouseout="window.status='';returntrue;">Games</A>
    </LI> <LI><A
    HREF="gotoConf.cgi?confName=News&view=" CLASS="cloLink"
    onmouseover="window.status='Goto News';return true;"
    onmouseout="window.status='';returntrue;">News</A> [Unread
    1 Total 1]</LI>
    <LI><A HREF="gotoConf.cgi?confName=Programming&view="
    CLASS="cloLink"
    onmouseover="window.status='Goto Programming';return true;"
    onmouseout="window.status='';returntrue;">Programming</A>
    [Unread 1 Total
    1]</LI> <LI><A HREF="gotoConf.cgi?
    confName=Talk&view="
    CLASS="cloLink" onmouseover="window.status='Goto
    Talk';return true;"
    onmouseout="window.status='';returntrue;">Talk</A> [Unread
    52 Total 52]</LI>
    <LI><A HREF="gotoConf.cgi?confName=Unix%20Help&view="
    CLASS="cloLink"
    onmouseover="window.status='Goto Unix Help';return true;"
    onmouseout="window.status='';returntrue;">Unix Help</A>
    [Unread 3 Total
    3]</LI> <LI><A
    HREF="gotoConf.cgi?confName=Weird%20Wonderful%20Web&view="
    CLASS="cloLink"
    onmouseover="window.status='Goto Weird Wonderful
    Web';return true;"
    onmouseout="window.status='';returntrue;">Weird Wonderful
    Web</A> [Unread 7
    Total 7]</LI> </UL><HR>

     
  • Martin Bateman

    Martin Bateman - 2001-08-23

    Logged In: YES
    user_id=110767

    I found what I think is the problem. The javascript doesn't
    have brackets around the true in retrun true eg it looks
    like return true and not return (true). I added the brackets
    and hopefully that should fix it. It looks like the newer
    version of IE rewrite the javascript before they run it. The
    space between the return and true was being removed.

    Requires testing.

     
  • Martin Bateman

    Martin Bateman - 2001-08-23
    • assigned_to: mbateman --> scamp
    • status: open --> open-fixed
     
  • Scamp

    Scamp - 2001-08-23

    Logged In: YES
    user_id=110805

    Emailed user to test

     
  • Scamp

    Scamp - 2001-08-23
    • assigned_to: scamp --> mbateman
     
  • Scamp

    Scamp - 2001-08-23

    Logged In: YES
    user_id=110805

    Response from user:
    When I log in, I still let the "untermniated string
    constant" errors.

    The "returntrue" errors have gone away.

    When I click on any link, the page I get in return says
    only "You are not
    logged on. Please log on.".

     
  • Scamp

    Scamp - 2001-08-23
    • status: open-fixed --> open-invalid
     
  • Martin Bateman

    Martin Bateman - 2001-08-23

    Logged In: YES
    user_id=110767

    IE6 doesn't like multiline strings (with a newline in them)
    Netscape/mozilla/older version of IE ignore them. I've done
    a fix.

    The you are not logged on comes from no cookies.

     
  • Scamp

    Scamp - 2001-08-23

    Logged In: YES
    user_id=110805

    Tested it again.

    Got another error:
    Line 71
    You are not logged on. Please log on.

    (after following a link)

    He has cookies enabled.

     
  • Scamp

    Scamp - 2001-08-23

    Logged In: YES
    user_id=110805

    Apparently the error happens on any link, except for Help.

    Help opens in a new window.

     
  • Martin Bateman

    Martin Bateman - 2001-08-23

    Logged In: YES
    user_id=110767

    IE6 doesn't like multiline strings (with a newline in them)
    Netscape/mozilla/older version of IE ignore them. I've done
    a fix.

    The you are not logged on comes from no cookies.

     

Log in to post a comment.

MongoDB Logo MongoDB