Mozilla Drop-down menus head-scratch

Discussion in 'Javascript' started by ReGenesis0@aol.com, Jun 22, 2006.

  1. Guest

    I am doing drop-down menus for a site I'm developing (not my idea,
    neadless to say.) I have a nice robust Javascript that handles it, and
    it actually WORKS, works across browsers even! How unexpected!

    However, I have one TINY problem. In netscape, ON OCCASION, the
    drop-down menus will show up halfway down the page. Reloading fixes
    this. Resizing the windows fixes this. (It's asising, I think,
    because of the Mozilla reansparent-picture-image-location hack for
    determing position of the original menu on the page.) And it doesnt'
    appear consistently.

    This is what I THINK is going on- when I double-click to refresh
    instead of single, the document re-loads, but some part of the layout
    beign generated by the first-click isn't properly cleared. (this bug
    onyl shows up when the page reloads funny, but it's often enough I want
    it not to happen, because it's MASSIVELY ugly.) Resizing the window
    causes it to recalculate the layout positions of those transparent
    gifs, and so it fixes itself.

    The script I have it really good. (It was someone else's, which I've
    mads some additiosn to.) I'd prefer NOT to gut and rebuild if I can.
    Especially not for a netscape-only problem.

    Is there a way to... 'poke' the document resize event when the page is
    finished loading and cause it to recalculate this? I think (provided
    it doesn't cause a page redraw) that would solve my problem, and it's
    simple enough I don't mind it as a concession to the browser.

    Or, has anyone else encountered this and have an alternate solution?
    Am I wrong on the cause? Etc.

    Technical: the dropdowns are absolutely-positioned DIV's with a z-index
    of 20 whose position is determined by the location of a transparent
    image before the to-level navigation option they're attached to.

    -Derik
     
    , Jun 22, 2006
    #1
    1. Advertising

  2. Guest

    I wrote:
    <snip>

    Slight update! I removes a tiny bit of odd CSS layout that was working
    in IE and not Mozilla, and the problem stopped.
    (Why the code would cause this problem instead if simply being
    non-supported, why the flag to offset by 10 pixels was offsetting by
    400, and why Mozilla would flailingly TRY is beyond me.)

    It was really WIERD code though. Instead of offsettign the table, I
    had flagged every CELL in the table to be relatively offset down 10
    pixels.
    ....I'm just surprised even IE would do somethign that stupid. I MEANT
    to do it to the table...

    -Derik
     
    , Jun 22, 2006
    #2
    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. SirPoonga
    Replies:
    2
    Views:
    818
    Ben Strackany
    Jan 7, 2005
  2. Dave
    Replies:
    2
    Views:
    318
    Nick Coghlan
    Dec 19, 2004
  3. weiwei
    Replies:
    0
    Views:
    1,073
    weiwei
    Jan 5, 2007
  4. msimmons
    Replies:
    0
    Views:
    549
    msimmons
    Jul 16, 2009
  5. Replies:
    5
    Views:
    317
Loading...

Share This Page