• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Interesting IE6 JavaScript Problem?

 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks,

I've been asked to include a floating menu on a client's website and have adapted an old script I found.

My problem is that, in IE6 and Netscape 6, the menu does not float when the page is scrolled. However, in IE5.x and Opera 7 it works fine. To add to the mix, when I tried to simplify the XHTML page to use in this posting, the simplified example fixed the problem.

I've already overspent significantly on this project and would appreciate it if anyone can shed any light on the probable cause of this problem, or if anyone has an academic interest in solving it via the usual arduous method...

The script is as shown below:



The URL of the test site that uses this code is http://www.yourworkplace.co.uk/test/new/v5/.

I call it with <body onload="floatMenu('menuPanel',130)">, where menuPanel is the name of a div with position: absolute;

Any help would be greatly appreciated!

Cheers,

Jules


P.S. The simplified HTML page that works is as follows:



Note that the above simplification uses fixed pixel sizes whereas the actual page design is liquid.
[ August 03, 2004: Message edited by: Eric Pascarello ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at this script and how they do the floating menu...

http://dynamicdrive.com/dynamicindex1/staticmenu.htm

Eric
 
JulianInactive KennedyInactive
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric,

Thanks for your reply. That's actually the script that I used as inspiration for my (clearly flawed) attempt. I want the script to be entirely contained in an external script file. Do you think that may be the cause of my problem? Then again, if that were the case, why would it work at all (even in the simplified version)?

I'm not concerned about support for browsers going back as far as NN4. IMO any remaining users should be dragged kicking and screaming into the 21st century where we have standards (at least of a sort!) :-)

Do you have any further thoughts?

Jules
 
JulianInactive KennedyInactive
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fang from the Webdeveloper.com forum has just pointed me to this sticky menu script.

I haven't used the script itself but it contains the solution to the IE6 problem, i.e. use document.documentElement.scrollTop instead of document.body.scrollTop. My script still doesn't work with NN6, but I can live with that. Any further pointers appreciated, however.

The new code is as follows:



Thanks for your efforts.

Jules
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forgot about that....

lol

When IE6 is in compliance mode, you need to adjust that property...lol...I forgot about that.
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic