Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:34
Menu not visible in Netscape 4
Poster: spraine
Dated: Sunday February 23 2003 - 2:43:34 GMT
Menu examples say usable on Netscape 4.x, but--after hours and hours of trying--found the following error message.
RE
<script language="JavaScript" src="menu_array.js" type="text/javascript"></script>
Attribute TYPE not supported by Netscape 3.x, 4.x, or IE 3.x, 4.x.
Well?
Steve
Re: Menu not visible in Netscape 4
Poster: kevin3442
Dated: Sunday February 23 2003 - 4:53:47 GMT
Hi Steve,
spraine wrote:
... <script language="JavaScript" src="menu_array.js" type="text/javascript"></script>
Attribute TYPE not supported by Netscape 3.x, 4.x, or IE 3.x, 4.x.
Attribute TYPE not supported by Netscape 3.x, 4.x, or IE 3.x, 4.x.
I'd have to say that error message is erroneous, at least insofar as the script tag goes. The telling point is that the samples on the Milonic site use that attribute, and they do work in NS4, although there are always some small differences among browsers in the way that the menus are rendered.
Given the nature of your error reports, I had another look at your menu_array.js file, focusing on the properties that correpspond to style issues. I'm pretty certain that your error results from a few inconsistent settings in your two style arrays (Hdr1Style and Gray3DStyle). In a style array, the 12th element is used to enable or disable the "3D Border & Separator bar" property... 0 = off, 1 = on. The idea is to turn this element on if you want to create a three dimensional, "button-like" look for your menu items. If Element 12 is set to 0, then Elements 13 and 14 are ignored. But if Element 12 is set to 1, then Elements 13 and 14 specify the colors to use for the 3D effect. Element 13, "3D High Color", specifies the color to be used for the left and top borders of the menu item. Element 14, "3D Low Color", specifies the color to be used for the right and bottom borders of the menu item. The problem I see is that you have Element 12 set to 1 in both style arrays, but Elements 13 and 14 are set to "" in both style arrays. So you're telling the menu system that you want a 3D effect, but you aren't providing the colors. With some browsers, "" will be interpreted as "transparent", so the menu will work but you won't get a 3D effect, because you can't see the "color". Apparently, NS4 chokes on "" in these two color settings, although "transparent" works fine. You could also simply leave 13 and 14 blank, but then NS4 might use an unexpected color for the menu items' borders.
Here's what I suggest:
(1) If you don't want a 3D effect, set Element 12 in the style arrays to 0, or leave it blank, and also leave Elements 13 and 14 blank.
(2) If you do want a 3D effect, set Element 12 to 1, then specify the colors you want in Elements 13 and 14.
Sorry I didn't catch this earlier. As you've seen, it's easy for little things to slip your notice, particularly if their effect isn't universal across browsers.
Regarding a question in your other thread... I'd say that as a general rule, content should be coded in the body, rather than the head, unless there is some compelling reason to do otherwise.
Hope this helps,
Kevin