Left offset

Discussion in 'Javascript' started by M.L., Dec 3, 2004.

  1. M.L.

    M.L. Guest

    Hi NG

    I have created a fairly simple dynamic drop-down menu, which works by
    hiding/showing DIV's (in another frame, though) on mouseover. I have
    built the menu so that it can cope with left/right scrolling, i.e. the
    DIV's always turn up in the same place, relative to the rest of the
    page content. I am calculating/measuring the left offset in order to
    this. So far, so good. My question is now this:

    Sometimes (rarely, actually), I get an "Object does not support this
    property..."-error on this code line, in which I determine the amount
    of left/right scroll:

    var ScrollLeftOffset = parent.main.document.body.scrollLeft;

    What is wrong, and why doesen't the error occur everytime I use the
    menu, but only perhaps 1 of every 50 times? Is there another, more
    stable, way of determining the left offset?

    Hope somone can help me out.

    Thanks!

    regards,

    M.L.
     
    M.L., Dec 3, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lance Riedel

    Translated Offset to Source Offset

    Lance Riedel, Oct 14, 2003, in forum: XML
    Replies:
    2
    Views:
    526
    Patrick TJ McPhee
    Oct 15, 2003
  2. gsb
    Replies:
    3
    Views:
    214
  3. Pieter Van Waeyenberge
    Replies:
    1
    Views:
    197
    Pieter Van Waeyenberge
    Feb 9, 2004
  4. Stevo
    Replies:
    10
    Views:
    312
    Thomas 'PointedEars' Lahn
    Mar 27, 2008
  5. Roy Smith
    Replies:
    4
    Views:
    319
    Roy Smith
    Jan 27, 2013
Loading...

Share This Page