FAQ
Why are there so many scripts?
Some of the text in my submenu is longer than one line,
but when it wraps it goes out of sync with the background.
<br> tags in the link text, eg:
addSubmenuItem("","Sample<br>Library","","");
I downloaded the script and put it on my page
and I don't see anything. What's going on?
var fFONT = "verdana"; is fine, but
var fFONT = verdana; will produce an error.
" brackets
[ ] braces { } or semi-colons ;
you will need to escape those characters with a backslash, eg:
addSubmenuItem("http://www.quoththeraven.com/","Quoth the raven, \"nevermore\"","","");Syntax errors like these will often produce the error message
"exclude" is undefined
I have the navbar in the top frame of a frameset,
but when the menus open they disappear behind the border. How do I fix that?
There is a fundamental problem with framesets,
and I strongly discourage anyone from using them. If you use this menu you have
no need for a navigation frame; simply put the script includes on each page,
and any changes you make to custom.js will be reflected throughout.
Furthermore, the menu scripts are always cached after their first use, even on html pages which don't
cache themselves.
However if you insist ... it is possible to script a topnav in one frame and then send the menu-building or show/hide commands to another frame; Top Nav IV can do this.
When a menu opens over a select box it shows through.
select in all except the gecko browsers,
and also input and textarea in ns4 and opera 5 and 6, have a z-order of infinity,
and will completely show through.
However for internet explorer the script includes a select-element hiding routine that's triggered when any menu opens. You can control this feature using hideSELECT
I've customised the script and now my page
has horizontal scrollbars. Why have they appeared?
Then there are a couple of unique circumstances where this might happen:
There is a bug in the mac port of Internet Explorer 5, which appears to add padding around absolutely positioned elements; such content which is also the full width of the screen creates horizontal scrollbars. I haven't been able to find a way of consistently predicting how much padding and therefore how much of a scrollbar you get in a given set of circumstances, although it does seem to be related to the width of the scrollbar itself. Suffice it to say that scrollbars are unavoidable with a full-width navbar. There is furthermore no way to suppress just the x-scroll in mac/ie5 - only complete scrollbar suppression is possible, which would not be very useful.
However it's possible to override the returned document width and define it yourself, thus avoiding these potential issues. This is documented here
I would prefer to separate the main menu items by "|",
but this was not possible... Using addMainItem("/","Home | ",188,"left","");
is not very good because the | is included in the <A> tag
addMainItem("","|",19,"center","");
addMainItem("/","Home",188,"left","");
addMainItem("","|",19,"center","");
I am attempting use images similar to your example under
"advanced customizations". As you mentioned, it doesn't seem to display well in NS4.
Is there a way to tell the browser that if it's NS4, not to show the images?
if (!ns4) { addMainItem("dropdown.zip","<img src='zip.gif' alt='' width=16 height=16 alt='' border=0>",35,"center","","Quick download",0,0); }
This would add the link for all browsers except netscape 4. For more information about link conditions, see the advanced customising guide. For a list of browser variables see variables from the sniffer script. If you want to build a fully cross-browser, image-based navbar then check out this tutorial.
The script works fine on my computer, but when I upload it to my website I get
an error message. I checked the error out and it was coming from the ad placed on the page by the geocities server
It doesn't always happen - some people have used this menu on a geocities site with no problems at all. But basically I don't think there's anything I can do.
I've noticed that when you resize the window it reloads the page. Is there any way to prevent this?
custom.js called allowRESIZE.
I've put the menu on my page and it looks great in all the browser, except Netscape 6 where it's messed up / doesn't appear at all.
div. Try running your page through
a validator; or start with a blank page with your customised menu on it, and add in the page's html in blocks
until you find the problem.
Can I use the menu links to open windows of a specific size?