Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Thursday February 8 2018 - 06:02:16

Can certain browser's ignore the menu?


Poster: tepidarium
Dated: Wednesday January 7 2004 - 21:15:00 GMT

Is it possible to have certain browsers ignore the milonic menu and display the page without the menu loaded (i.e. Netscape 4, older versions of IE?)

Re: Can certain browser's ignore the menu?


Poster: timrivera
Dated: Thursday January 8 2004 - 1:26:43 GMT

tepidarium wrote:Is it possible to have certain browsers ignore the milonic menu and display the page without the menu loaded (i.e. Netscape 4, older versions of IE?)


As for NN4, just remove the NS4 script, as explained in the menu FAQ:

"I have no need to support Netscape 4, can I remove the reference to it?"
http://milonic.com/menufaq.php#nonavi4


As for IE, thought about conditional comments, but I couldn't figure out a good way to use them. You could use conditional comments to have the script given only in IE5+, but that leaves out the other browsers such as Opera and Mozilla. You could use conditional comments to insert a pair of some sort of HTML tags (i.e. <noscript>) for older versions of IE to prevent the scripts from being rendered, but that would be invalid markup if you have the scripts in the HEAD section.


Tim


Poster: tepidarium
Dated: Thursday January 8 2004 - 19:16:38 GMT

I have tried this method as described in the FAQ, but it does not cause netscape to ignore the menu. Netscape4 simply doesn't load the page.

I am wondering if there is a way to just have netscape ignore the code and actually load the page without the menu code causing it to mess up.

The code, if one chooses to "not support" Netscape4 would then be? :

Code: Select all

<script language=JavaScript src="milonic_src.js" type=text/javascript></script>
<script language=JavaScript src="mmenudom.js" type=text/javascript></script>
<script language=JavaScript src="menu_data.js" type=text/javascript></script>
[/url]


Poster: timrivera
Dated: Thursday January 8 2004 - 20:51:20 GMT

tepidarium wrote:I have tried this method as described in the FAQ, but it does not cause netscape to ignore the menu. Netscape4 simply doesn't load the page.


You are right. I just tried using NN4.8, and the main menu loads but nothing else on the page. I received these errors:

JavaScript Error: milonic_src.js, line 16:
_$S is not defined.

JavaScript Error: mmenudom.js, line 16:
ie55 is not defined.

JavaScript Error: mmenudom.js, line 16:
ie55 is not defined.


Poster: Ruth
Dated: Friday January 9 2004 - 0:03:08 GMT

seems like what is needed is some code to call say version 3..which isn't supported, let me say, if it's netscape4....ver3 worked pretty good in that browser, but don't ask what that would be, I wouldn't know a code if it slapped me in the face...well, I might know it was code but no idea what it was doing... :lol: But, is there something in the other files that somehow mess up if the mmenuns4.js isn't there? Hopefully, ya'll know what i'm trying to say....
Ruth


Poster: Hergio
Dated: Saturday January 10 2004 - 5:44:37 GMT

If you are savvy enough you can take a look in milonic_src. There you will see extensive browser testing code and see there are a number of variables set based on what browser is detected. You can use these variables to your advantage and decide whether or not to load the menu_data file or not.

In fact, as you'll know the basic code to load the menu scripts has the if(ns4) in it to decide whether or not to load mmenuns4 or mmenudom correct? Well surround your loading of the menu_data file with a similar if statement, if( !ns4) , and it will only load the menu_data file only if it DOES NOT detect ns4.

And the reason you get errors is because functions and variables are actually defined in the mmenuXXX files. And if you just remove them then when menu_data calls on things that dont exist, you get errors.