View Full Version : floating menu

08-19-2007, 06:35 PM
Hello all. I am experiencing a strange problem with a floating layer menu. The original code was borrowed from Henrik Petersen (http://www.echoecho.com/toolfloatinglayer.htm). An example of this menu can be seen on one of my client's website: http://www.illinoismeatprocessors.com/pages/awards/curedmeats.php.

Here's the situation. The menu floats on the right of the page and scrolls along with the user both up and down. The strange thing is that the script will fail predictably if the user takes certain actions. For instance, with this long page, if you scroll down too far, the menu disappears and you get a script error (document.all.floatlayer.style' is null or not an object). The menu will fail in the same manner on a short page (http://www.illinoismeatprocessors.com/pages/awards/sleeterbull.php) when the user scrolls down and then back up. If you go to the original author's code page, you'll see that the script fails in the same manner there (so I don't believe it's a problem that I've inadvertently created).

Now, admitedly, I've only checked this code in IE. It's supposed to work in NN too, but that's just my assumption. If anyone has a clue as to why this code may be failing, I'm all ears!



08-20-2007, 06:37 AM
On a windows platform it works in IE7, FF 2.0 and Opera 9, but does not move vertically with Safari, only horizontally. I could not reproduce your error.

I did notice that if the remote rndpig image loaded slow, it would could cause IE7 to not know when the page had ended and you could use the down scroll arrow to scroll past the end of the bottom of the page.

The short page really doesn't need a scrolling menu.

You could probably find a more bullet proof menu script, current and tested in several browsers.

08-20-2007, 01:50 PM
Thanks for the reply and testing my script on other browsers. I went back and tested the script in IE7 and you're exactly right, it does not fail. I forgot to mention that I exclusively use Maxthon (v. 1.6.1 build 22 unicode), a customizable wrapper for IE7. This means the problem MUST be with Maxthon, and not IE7. I'll try and find help for this issue on Maxthon forums.