Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:41
Can certain browsers be forced to ignore the Menu?
Poster: tepidarium
Dated: Tuesday February 24 2004 - 19:27:02 GMT
Hi,
Is there some way (perhaps some sort of Javascript) to allow Netscape 4 to completely ignore the Milonic Menu code and not load the menu?
Simply omitting the part of the menu code that pertains to NN4 will result in netscape not being able to load the page at all...
Thanks for any advice...
Poster: kevin3442
Dated: Tuesday February 24 2004 - 20:58:20 GMT
Maybe something like the following would work. Replace the standard lines for loading the menu scripts... i.e., these:
Code:
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>
with these:
Code:
<script language="javascript">
_NS4 = (document.layers) ? true : false;
if(!_NS4) {
document.write("<scr"+"ipt language=JavaScript src=milonic_src.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=menu_data.js><\/scr"+"ipt>");
}
</script>
_NS4 = (document.layers) ? true : false;
if(!_NS4) {
document.write("<scr"+"ipt language=JavaScript src=milonic_src.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=menu_data.js><\/scr"+"ipt>");
}
</script>
Let us know if that works.
Kevin
Poster: tepidarium
Dated: Tuesday February 24 2004 - 20:59:51 GMT
I'll try it and let you know.
Thanks for your response, Kevin!
Poster: tepidarium
Dated: Tuesday February 24 2004 - 21:09:34 GMT
Golly! Kevin - it works!
Check out: http://www.citytech.cuny.edu/mm-xns4.html
Of course, you'll need a copy of N4x to see the result.
This is great. I didn't like the performance of the menu in N4 (loads real slow and can crash the browser) now I can have N4 ignore the menu and I have text links to the main page of the site at the bottom of the page. Now if I could get the menu to hide the flash scroller I'd be set to implement the menu!
Thanks for that javascript code!
Poster: kevin3442
Dated: Tuesday February 24 2004 - 21:20:29 GMT
tepidarium wrote:
...Of course, you'll need a copy of N4x to see the result.
No way ... I'll just take your word for it!
Glad it helped,
Kevin
Poster: Ruth
Dated: Tuesday February 24 2004 - 21:24:19 GMT
Well, I've got 4.79 and yep it works, no menu!
Poster: tepidarium
Dated: Tuesday February 24 2004 - 21:30:55 GMT
innkeeper9 wrote:
Well, I've got 4.79 and yep it works, no menu!
yay!
Poster: Ruth
Dated: Tuesday February 24 2004 - 22:09:48 GMT
What do you mean, hide the flash scroller?
Ruth
Poster: tepidarium
Dated: Wednesday February 25 2004 - 1:50:55 GMT
innkeeper9 wrote:
What do you mean, hide the flash scroller?
Ruth
Ruth
The news scroller under the right side of the menu. In some browsers - IE 5.0, 5.5, Safari, 5.2 for the mac, Opera 5 & 7, the menu opens behind the flash movie.
I haven't been able to find a good cross browser dhtml solution (they almost always don't work well in NS4 & others) so Is tick with the flash...
The milonic hide div function does not yet work...so no options really.
Poster: Ruth
Dated: Wednesday February 25 2004 - 2:22:37 GMT
I don't know about the hide div function, but the divhider.js works. I have it on my site which has an applet. http://www.poems2u.com/page0.htmland here's the link for the sample. http://www.milonic.com/download.php?sampleid=14 The only thing when I first got it I couldn't find the divhider.js file, that's because it's not with the sample, but since it's on the milonic page where the sample is shown it got downloaded the my temp internet files and I just copied it from there. The version on the site is rc31...I'm redoing the menu before I update everything but I did test with the newest 5.03 and it seems to work even better.
Edit: I forgot, it works in nn4.79, and up, Firebird .07, Opera 7. It doesnt' work in Opera 6, and I don't know about macs.
Ruth
Poster: tepidarium
Dated: Wednesday February 25 2004 - 4:34:03 GMT
innkeeper9 wrote:
I don't know about the hide div function, but the divhider.js works. I have it on my site which has an applet. http://www.poems2u.com/page0.htmland here's the link for the sample. http://www.milonic.com/download.php?sampleid=14 The only thing when I first got it I couldn't find the divhider.js file, that's because it's not with the sample, but since it's on the milonic page where the sample is shown it got downloaded the my temp internet files and I just copied it from there. The version on the site is rc31...I'm redoing the menu before I update everything but I did test with the newest 5.03 and it seems to work even better.
Edit: I forgot, it works in nn4.79, and up, Firebird .07, Opera 7. It doesnt' work in Opera 6, and I don't know about macs.
Ruth
Edit: I forgot, it works in nn4.79, and up, Firebird .07, Opera 7. It doesnt' work in Opera 6, and I don't know about macs.
Ruth
Hmm..I remember using divhider.js and there being a problem. I'll try it again and let you know..thanks for the suggestion.
Poster: tepidarium
Dated: Wednesday February 25 2004 - 4:35:09 GMT
kevin3442 wrote:
tepidarium wrote:
...Of course, you'll need a copy of N4x to see the result.
No way ... I'll just take your word for it!
Glad it helped,
Kevin
Kevin - Is there a way to augment the javascript cod you wrote above to include other content other than the menu (ie. so I could provide an alternative text based links) Something like an if then else statement?
Poster: Ruth
Dated: Wednesday February 25 2004 - 11:21:54 GMT
Well, I can't test it on Macs so maybe that was the problem?
Quote:
tepidarium wrote:
Kevin - Is there a way to augment the javascript cod you wrote above to include other content other than the menu (ie. so I could provide an alternative text based links) Something like an if then else statement?
Kevin - Is there a way to augment the javascript cod you wrote above to include other content other than the menu (ie. so I could provide an alternative text based links) Something like an if then else statement?
That's a good question. I wonder if that could be designed to have nn4 choose version 3, and all the others to choose version 5? Not that the menu doesn't work well in nn4, but the design I do causes problems in nn4.
Ruth
Poster: tepidarium
Dated: Wednesday February 25 2004 - 15:00:01 GMT
innkeeper9 wrote:
I don't know about the hide div function, but the divhider.js works. I have it on my site which has an applet. http://www.poems2u.com/page0.htmland here's the link for the sample. http://www.milonic.com/download.php?sampleid=14 The only thing when I first got it I couldn't find the divhider.js file, that's because it's not with the sample, but since it's on the milonic page where the sample is shown it got downloaded the my temp internet files and I just copied it from there. The version on the site is rc31...I'm redoing the menu before I update everything but I did test with the newest 5.03 and it seems to work even better.
Ruth
Ruth
Hi,
I downloaded the divhider sample again and this is tstrange but the package does not contain any reference to divhider.js in the code nor does it show what to write into the code to make it work... any suggestions...it works great on your site!
Poster: tepidarium
Dated: Wednesday February 25 2004 - 15:33:38 GMT
Innkeeper - I took a look at your menu code and figured out how to do it. The hidediv is working great but there is one problem -- in MAC Safari - after the div hides the flash movie, it does not show it again when the user scrolls off the affected menus
anyone who can help please have a look in MAC Safari:
http://www.citytech.cuny.edu/mm-xns4-div.html
It works great in MAC IE 5.02
P.s. I removed the style postion relative for the div in the meu code because on window resize in netscape 6 for the pc it moves the flash movie all over the page.
Poster: Ruth
Dated: Wednesday February 25 2004 - 15:51:01 GMT
I was just going to give you the info. I noticed that you've got it set inside that particular table cell, and i'm sure that's how it's supposed to work. Mine is the whole table since the applet takes up about 80% of it. Anyway, I don't know about macs... ... I don't know about pcs either, so I just try various things to see if this or that works. Wonder if you put it outside the whole table in which that flash is, if that might take care of the safari issue? Or perhaps put it outside the <td> in which the flash is. Just a thought.
Ruth
Poster: kevin3442
Dated: Wednesday February 25 2004 - 16:32:44 GMT
innkeeper9 wrote:
...here's the link for the sample. http://www.milonic.com/download.php?sampleid=14 The only thing when I first got it I couldn't find the divhider.js file, that's because it's not with the sample,...
This seems to come sometimes when people download the div hiding sample... divhider.js is not in the downladable version. For anyone who is interested, you can click here to download divhider.js. You should place it in the same folder as the other files you extracted from the downloadable sample.
Kevin
Poster: kevin3442
Dated: Wednesday February 25 2004 - 16:43:57 GMT
innkeeper9 wrote:
Quote:
tepidarium wrote:
Kevin - Is there a way to augment the javascript cod you wrote above to include other content other than the menu (ie. so I could provide an alternative text based links) Something like an if then else statement?
Kevin - Is there a way to augment the javascript cod you wrote above to include other content other than the menu (ie. so I could provide an alternative text based links) Something like an if then else statement?
That's a good question. I wonder if that could be designed to have nn4 choose version 3, and all the others to choose version 5? Not that the menu doesn't work well in nn4, but the design I do causes problems in nn4.
Ruth
Tep: Yes. All things are possible through javascript... well... ok, not really, but many things are and this should be one of them. Generally, like so:
Code:
<script language="javascript">
_NS4 = (document.layers) ? true : false;
if (_NS4) {
// do ns4 stuff
}
else {
// do non-ns4 stuff, like loading menu scripts.
}
</script>
_NS4 = (document.layers) ? true : false;
if (_NS4) {
// do ns4 stuff
}
else {
// do non-ns4 stuff, like loading menu scripts.
}
</script>
If you want more specifics, maybe we can look at that a bit later. Here's another thought... Could you put some regular html links behind where the menu normally is? They'd always be there (also good for search engine indexing), but when the menu is present, it would cover up the links, so it would be as if they weren't there. But if the menu wasn't present (NS4), the links would be uncovered and available.
Ruth: Very interesting idea (loading v3 menu for NS4). And definitely do-able. I believe tepidarium would still run into the flash problem, although v3 has a div hiding function also (and I also wrote some div hiding scripts for v3 that were definitely effective against NS4).
Kevin
Poster: tepidarium
Dated: Wednesday February 25 2004 - 18:38:10 GMT
kevin3442 wrote:
Tep: Yes. All things are possible through javascript... well... ok, not really, but many things are and this should be one of them. Generally, like so:
If you want more specifics, maybe we can look at that a bit later. Here's another thought... Could you put some regular html links behind where the menu normally is? They'd always be there (also good for search engine indexing), but when the menu is present, it would cover up the links, so it would be as if they weren't there. But if the menu wasn't present (NS4), the links would be uncovered and available.
Code:
<script language="javascript">
_NS4 = (document.layers) ? true : false;
if (_NS4) {
// do ns4 stuff
}
else {
// do non-ns4 stuff, like loading menu scripts.
}
</script>
_NS4 = (document.layers) ? true : false;
if (_NS4) {
// do ns4 stuff
}
else {
// do non-ns4 stuff, like loading menu scripts.
}
</script>
If you want more specifics, maybe we can look at that a bit later. Here's another thought... Could you put some regular html links behind where the menu normally is? They'd always be there (also good for search engine indexing), but when the menu is present, it would cover up the links, so it would be as if they weren't there. But if the menu wasn't present (NS4), the links would be uncovered and available.
Hi kevin,
Thanks for your response...What do you mean by putting links "behind" the menu? I have the menu locked into a table cell - I don't see how I could place links behind the menu...
as for the javascript, I know zero coding, (i wish I knew it) and I'm not sure of the syntax...
Poster: tepidarium
Dated: Thursday February 26 2004 - 16:19:47 GMT
Hi - I have another code example and question:
On my page, the initial menu is embedded in a table cell...what I would like to have happen is if the browser is Netscape 4 - load text links; if the browser is anything else, load the first menu. At the top of the page I already have the snippet of javascript that kevin wrote to have netscape 4 ignore the intial menu code. I don't know javascript - this is what I came up with but the section portion of the code, the ELSE statement doesn't work -- could someone help me? : Here is the code:
Code:
<script language="javascript">
_NS4 = (document.layers) ? true : false;
if (_NS4) {
document.write("<a href=http://www.citytech.cuny.edu/aboutus/index.html>About Us</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/academics/index.html> Academics</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/admissions/index.html>Admissions</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/alumni/index.html>Alumni</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/faculty/index.html>Faculty/Staff</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/students/index.html>Students</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/search/index.html>Search</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/sitemap/index.html>Site Map</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/index.html>Home</a>");
// do ns4 stuff
}
else {
document.write("
<script>
with(milonic=new menuname("Main Menu")){
style=mainStyle;
alwaysvisible=1;
orientation="horizontal";
position="relative";
aI("text=About Us;url=http://www.citytech.cuny.edu/aboutus/index.html;status=About Us;showmenu=About;itemwidth=82;itemheight=18;align=center;");
aI("text=Academics;url=http://www.citytech.cuny.edu/academics/index.html;status=Academics;showmenu=Academics;itemwidth=82;itemheight=18;align=center;");
aI("text=Admissions;url=http://www.citytech.cuny.edu/admissions/index.html;status=Admissions;showmenu=Admissions;itemwidth=82;itemheight=18;align=center;");
aI("text=Alumni;url=http://www.citytech.cuny.edu/alumni/index.html;status=Alumni;itemwidth=82;itemheight=18;align=center;");
aI("text=Faculty/Staff;url=http://www.citytech.cuny.edu/faculty/index.html;status=Faculty/Staff;showmenu=Faculty;itemheight=18;itemwidth=83;align=center;");
aI("text=Students;url=http://www.citytech.cuny.edu/students/index.html;status=Students;showmenu=Students;itemwidth=82;itemheight=18;align=center;");
aI("text=Search;url=http://www.citytech.cuny.edu/search/index.html;status=Search;showmenu=Search;itemwidth=82;itemheight=18;align=center;");
aI("text=Site Map;url=http://www.citytech.cuny.edu/sitemap/index.html;status=Site Map;itemwidth=82;itemheight=18;align=center;");
aI("text=Home;url=http://www.citytech.cuny.edu/mm-pop.html;status=Home;itemheight=18;itemwidth=83;align=center;");
}
drawMenus();
</script>
// do non-ns4 stuff, like loading menu scripts.
}
</script>");
_NS4 = (document.layers) ? true : false;
if (_NS4) {
document.write("<a href=http://www.citytech.cuny.edu/aboutus/index.html>About Us</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/academics/index.html> Academics</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/admissions/index.html>Admissions</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/alumni/index.html>Alumni</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/faculty/index.html>Faculty/Staff</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/students/index.html>Students</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/search/index.html>Search</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/sitemap/index.html>Site Map</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/index.html>Home</a>");
// do ns4 stuff
}
else {
document.write("
<script>
with(milonic=new menuname("Main Menu")){
style=mainStyle;
alwaysvisible=1;
orientation="horizontal";
position="relative";
aI("text=About Us;url=http://www.citytech.cuny.edu/aboutus/index.html;status=About Us;showmenu=About;itemwidth=82;itemheight=18;align=center;");
aI("text=Academics;url=http://www.citytech.cuny.edu/academics/index.html;status=Academics;showmenu=Academics;itemwidth=82;itemheight=18;align=center;");
aI("text=Admissions;url=http://www.citytech.cuny.edu/admissions/index.html;status=Admissions;showmenu=Admissions;itemwidth=82;itemheight=18;align=center;");
aI("text=Alumni;url=http://www.citytech.cuny.edu/alumni/index.html;status=Alumni;itemwidth=82;itemheight=18;align=center;");
aI("text=Faculty/Staff;url=http://www.citytech.cuny.edu/faculty/index.html;status=Faculty/Staff;showmenu=Faculty;itemheight=18;itemwidth=83;align=center;");
aI("text=Students;url=http://www.citytech.cuny.edu/students/index.html;status=Students;showmenu=Students;itemwidth=82;itemheight=18;align=center;");
aI("text=Search;url=http://www.citytech.cuny.edu/search/index.html;status=Search;showmenu=Search;itemwidth=82;itemheight=18;align=center;");
aI("text=Site Map;url=http://www.citytech.cuny.edu/sitemap/index.html;status=Site Map;itemwidth=82;itemheight=18;align=center;");
aI("text=Home;url=http://www.citytech.cuny.edu/mm-pop.html;status=Home;itemheight=18;itemwidth=83;align=center;");
}
drawMenus();
</script>
// do non-ns4 stuff, like loading menu scripts.
}
</script>");
Poster: kevin3442
Dated: Thursday February 26 2004 - 17:01:29 GMT
Hi Tep,
So, if I understand correctly, the code from your last post is going in the table where you normally have your main menu, right? Congrats on figuring out the if part for the NS4 code (the document.write() stuff). Looks to me, however, like the else part has some syntax issues. Mainly, it looks like you are trying to have a script write a script... not necessary, since the js code for the menu is already javascript and is it already inside of <script> tags. Try this:
Code:
<script language="javascript">
_NS4 = (document.layers) ? true : false;
if (_NS4) {
document.write("<a href=http://www.citytech.cuny.edu/aboutus/index.html>About Us</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/academics/index.html> Academics</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/admissions/index.html>Admissions</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/alumni/index.html>Alumni</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/faculty/index.html>Faculty/Staff</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/students/index.html>Students</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/search/index.html>Search</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/sitemap/index.html>Site Map</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/index.html>Home</a>");
}
else {
with(milonic=new menuname("Main Menu")){
style=mainStyle;
alwaysvisible=1;
orientation="horizontal";
position="relative";
aI("text=About Us;url=http://www.citytech.cuny.edu/aboutus/index.html;status=About Us;showmenu=About;itemwidth=82;itemheight=18;align=center;");
aI("text=Academics;url=http://www.citytech.cuny.edu/academics/index.html;status=Academics;showmenu=Academics;itemwidth=82;itemheight=18;align=center;");
aI("text=Admissions;url=http://www.citytech.cuny.edu/admissions/index.html;status=Admissions;showmenu=Admissions;itemwidth=82;itemheight=18;align=center;");
aI("text=Alumni;url=http://www.citytech.cuny.edu/alumni/index.html;status=Alumni;itemwidth=82;itemheight=18;align=center;");
aI("text=Faculty/Staff;url=http://www.citytech.cuny.edu/faculty/index.html;status=Faculty/Staff;showmenu=Faculty;itemheight=18;itemwidth=83;align=center;");
aI("text=Students;url=http://www.citytech.cuny.edu/students/index.html;status=Students;showmenu=Students;itemwidth=82;itemheight=18;align=center;");
aI("text=Search;url=http://www.citytech.cuny.edu/search/index.html;status=Search;showmenu=Search;itemwidth=82;itemheight=18;align=center;");
aI("text=Site Map;url=http://www.citytech.cuny.edu/sitemap/index.html;status=Site Map;itemwidth=82;itemheight=18;align=center;");
aI("text=Home;url=http://www.citytech.cuny.edu/mm-pop.html;status=Home;itemheight=18;itemwidth=83;align=center;");
}
drawMenus();
}
</script>
_NS4 = (document.layers) ? true : false;
if (_NS4) {
document.write("<a href=http://www.citytech.cuny.edu/aboutus/index.html>About Us</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/academics/index.html> Academics</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/admissions/index.html>Admissions</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/alumni/index.html>Alumni</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/faculty/index.html>Faculty/Staff</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/students/index.html>Students</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/search/index.html>Search</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/sitemap/index.html>Site Map</a> | ");
document.write("<a href=http://www.citytech.cuny.edu/index.html>Home</a>");
}
else {
with(milonic=new menuname("Main Menu")){
style=mainStyle;
alwaysvisible=1;
orientation="horizontal";
position="relative";
aI("text=About Us;url=http://www.citytech.cuny.edu/aboutus/index.html;status=About Us;showmenu=About;itemwidth=82;itemheight=18;align=center;");
aI("text=Academics;url=http://www.citytech.cuny.edu/academics/index.html;status=Academics;showmenu=Academics;itemwidth=82;itemheight=18;align=center;");
aI("text=Admissions;url=http://www.citytech.cuny.edu/admissions/index.html;status=Admissions;showmenu=Admissions;itemwidth=82;itemheight=18;align=center;");
aI("text=Alumni;url=http://www.citytech.cuny.edu/alumni/index.html;status=Alumni;itemwidth=82;itemheight=18;align=center;");
aI("text=Faculty/Staff;url=http://www.citytech.cuny.edu/faculty/index.html;status=Faculty/Staff;showmenu=Faculty;itemheight=18;itemwidth=83;align=center;");
aI("text=Students;url=http://www.citytech.cuny.edu/students/index.html;status=Students;showmenu=Students;itemwidth=82;itemheight=18;align=center;");
aI("text=Search;url=http://www.citytech.cuny.edu/search/index.html;status=Search;showmenu=Search;itemwidth=82;itemheight=18;align=center;");
aI("text=Site Map;url=http://www.citytech.cuny.edu/sitemap/index.html;status=Site Map;itemwidth=82;itemheight=18;align=center;");
aI("text=Home;url=http://www.citytech.cuny.edu/mm-pop.html;status=Home;itemheight=18;itemwidth=83;align=center;");
}
drawMenus();
}
</script>
Kevin
Poster: tepidarium
Dated: Thursday February 26 2004 - 18:08:16 GMT
Kevin, thank you, thank you - that is it!
YAY!!!!!
Poster: Maz
Dated: Thursday February 26 2004 - 18:09:33 GMT
This is excellent if it works, a couple of questions.
Would this work out of a table just from the menu placing on top of a white background?
If the menu works in netscape 4, then what doesn't work, perhaps if a netscape 4 menu without any images, just plain text and drop down submenus would work also?
Thanks,
maz
Poster: tepidarium
Dated: Thursday February 26 2004 - 18:12:13 GMT
maz wrote:
This is excellent if it works, a couple of questions.
Would this work out of a table just from the menu placing on top of a white background?
If the menu works in netscape 4, then what doesn't work, perhaps if a netscape 4 menu without any images, just plain text and drop down submenus would work also?
Thanks,
maz
Would this work out of a table just from the menu placing on top of a white background?
If the menu works in netscape 4, then what doesn't work, perhaps if a netscape 4 menu without any images, just plain text and drop down submenus would work also?
Thanks,
maz
Maz - i'm cuccrently running it on a test page:
http://www.citytech.cuny.edu/mm-xns4-div2.html
This replaces milonic menu with a top hierarchy text link menu in NN4!!!
WOO!!![/code]
Poster: Maz
Dated: Thursday February 26 2004 - 18:36:18 GMT
I don't have the browser to test, looks fine in Safari.
Do submenus work in Netscape 4? I think I'd try a simple menu if they do.
Thanks,
maz
Poster: John
Dated: Thursday February 26 2004 - 19:30:46 GMT
Looks good, tep, and works as advertised in NS4 (don't ask where I found that piece of junk!).
Since today is rag-day, I'd lighten up the blue in the menu links a bit. It's tough to see against the black.
Poster: Maz
Dated: Thursday February 26 2004 - 20:38:46 GMT
Well, rag on me John, what can I do, I don't have Netscape to see what to do, nor a table.
maz
Poster: tepidarium
Dated: Thursday February 26 2004 - 21:56:37 GMT
jgillett wrote:
Looks good, tep, and works as advertised in NS4 (don't ask where I found that piece of junk!).
Since today is rag-day, I'd lighten up the blue in the menu links a bit. It's tough to see against the black.
Since today is rag-day, I'd lighten up the blue in the menu links a bit. It's tough to see against the black.
yep, yep...I'm actually using an altered stylesheet on my local computer so when I finally upload this it should look different...thanks though
Poster: Ruth
Dated: Tuesday March 9 2004 - 17:37:21 GMT
Well, finally, I'm back. Kevin wrote way back when:
Quote:
Ruth: Very interesting idea (loading v3 menu for NS4). And definitely do-able. I believe tepidarium would still run into the flash problem, although v3 has a div hiding function also (and I also wrote some div hiding scripts for v3 that were definitely effective against NS4).
Kevin
My question was for my site. Because of the color play I do with the style and on/off class I would really like to be able to call V3 for Netscape 4 versions. Especially now since the newer V5 has the link and vlink properties which it is reading from the style sheet. I have just deleted those and used the html font code for any text links on the pages, and the menu just uses the colors I have listed for text now, but in Netscape 4 that means it is now making all the menu text [which is links of course] the danged blue link default color. Until that was done V5 worked ok in NN4, just taking the font colors I had listed.
Kevin
Ruth
Poster: pavia
Dated: Sunday March 14 2004 - 16:55:38 GMT
To follow up on Ruth's inquiry about loading Version 3 for Netscape 4...
Kevin says it's definitely do-able.
Uh, okay...how?
More specifically, how to do it if currently using Version 5 and the plain old horizontal implementation with a screen position of center?
This would be the perfect solution for those of us who have to include usability for NS4...and would truly be a godsend(!)
Poster: Ruth
Dated: Sunday March 14 2004 - 19:43:10 GMT
I haven't seen Hergio or Kevin posting anything lately and they were the ones helping with so many of our way out script questions at least all the ones I was asking about. I've been wondering where they are. Maybe just overwhelmed in projects. Hope they are OK.
Ruth
Poster: Ruth
Dated: Sunday March 14 2004 - 21:27:26 GMT
DUH Are we perhaps getting too involved here? It just crossed my mind that instead of trying to call two different menu systems ie v3 and v5, would we be able to just tell nn4 to use one menu_data.js file which was a simple design for that particular browser and the other browsers to use the main one with all our fancy stuff? That way we'd be one menu system and pretty much the same coding and links, just prehaps a simpler style and function design? Or wouldn't that be possible?
Ruth
Poster: pavia
Dated: Monday March 15 2004 - 0:51:15 GMT
I guess it would be possible but the problems I'm seeing with Version 5 in Netscape 4 aren't really style-related. Like, it's not that there's too much fancy-schmancy stuff in the menu_data.js file...for whatever reason(s), Version 5 just blows up in Netscape 4.
See, this way, if I could load Version 3 for NS4, I could stop whining about how NS4 sucks and doesn't really work with Version 5 of the menu. For me, it would be worth the extra work of maintaining two different systems. You haven't experienced any freaky, unexplainable stuff in NS4?
Poster: Ruth
Dated: Monday March 15 2004 - 1:56:36 GMT
Well, I don't know what problems you are seeing, I haven't seen a single one except those related to the style I'm trying to get. If there are issues you might post them, also have you got the latest version 5.06, perhaps the issues where fixed in it.
Ruth
Poster: pavia
Dated: Monday March 15 2004 - 21:32:04 GMT
The main problem (the insurmountable one) using Version 5 of the menu in Netscape 4 is that after a few passes of the mouse over menu items, the menu ceases to work. It just freezes up, in whatever state it was in...and with no consistent pattern. I did post the issue awhile ago...so did others needing NS4 functionality. Never got resolved.
Poster: Ruth
Dated: Monday March 15 2004 - 21:42:09 GMT
Try posting it as a new topic seeing if it's been resolved or if the cause has been found. And, have you updated to the newest files, we're at 5.06 now. Many fixes have been done.
Ruth
Poster: pavia
Dated: Monday March 15 2004 - 22:15:29 GMT
I'm up-to-date on the fixes.
I basically gave up on expecting Version 5 to work flawlessly with Netscape 4. It's understandably not a priority for the developer because NS 4 sucks and is old. That's why figuring how to code javascript to load Version 3 of the menu for NS 4 browsers would be the perfect compromise. I just hope this request for some assistance doesn't get buried...
Poster: kevin3442
Dated: Monday March 15 2004 - 23:49:50 GMT
pavia wrote:
Kevin says it's definitely do-able.... Uh, okay...how? ...
Let's assume that your file names for v3 and v5 are standard. For v5 the menu scripts for dom browsers are milonic_src.js and mmenudom.js, and the data file is menu_data.js. For v3 the menu script is mmenu.js and the data file is menu_array.js. You can load these differentially, v3 for NS4, and v5 for everything else, like so:
Code:
<script language="javascript">
_NS4 = (document.layers) ? true : false;
if (_NS4) {
document.write("<scr"+"ipt language=JavaScript src=menu_array.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenu.js><\/scr"+"ipt>");
}
else {
document.write("<scr"+"ipt language=JavaScript src=milonic_src.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=menu_data.js><\/scr"+"ipt>");
}
</script>
_NS4 = (document.layers) ? true : false;
if (_NS4) {
document.write("<scr"+"ipt language=JavaScript src=menu_array.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenu.js><\/scr"+"ipt>");
}
else {
document.write("<scr"+"ipt language=JavaScript src=milonic_src.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=menu_data.js><\/scr"+"ipt>");
}
</script>
As I recall, v3 was best loaded in the <body>, so you could put the above script as the first few lines after the opening <body> tag. Alternatively, you could split it up, loading v5 stuff in the <head> and v3 stuff in the <body>, like so:
Code:
<head>
.
.
.
<script language="javascript">
_NS4 = (document.layers) ? true : false;
if (! _NS4) { // v5 stuff for non-NS4
document.write("<scr"+"ipt language=JavaScript src=milonic_src.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=menu_data.js><\/scr"+"ipt>");
}
</script>
.
.
.
</head>
<body>
<script language="javascript">
if (_NS4) { // v3 stuff for NS4
document.write("<scr"+"ipt language=JavaScript src=menu_array.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenu.js><\/scr"+"ipt>");
}
</script>
.
.
.
</body>
.
.
.
<script language="javascript">
_NS4 = (document.layers) ? true : false;
if (! _NS4) { // v5 stuff for non-NS4
document.write("<scr"+"ipt language=JavaScript src=milonic_src.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=menu_data.js><\/scr"+"ipt>");
}
</script>
.
.
.
</head>
<body>
<script language="javascript">
if (_NS4) { // v3 stuff for NS4
document.write("<scr"+"ipt language=JavaScript src=menu_array.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenu.js><\/scr"+"ipt>");
}
</script>
.
.
.
</body>
Of course, you would set path names to the .js files as necessary. Give that a go... hope it helps,
Kevin
Poster: Ruth
Dated: Tuesday March 16 2004 - 0:46:06 GMT
Hi Kevin. This code has the browser trying to load the file but it stops and gives a javascript error: mmenu.js line 452:
_d.layers[mnu] has no properties. I looked in the file [though I would have no idea what to do about it and it has these lines:
Code:
if(ns4)
{
mt=_d.layers[mnu].document.layers["el"+(el-1)]
if (!menu[11]) and so on
{
mt=_d.layers[mnu].document.layers["el"+(el-1)]
if (!menu[11]) and so on
Ruth
Poster: pavia
Dated: Tuesday March 16 2004 - 1:16:41 GMT
Kevin! Our hero!
Okay, I blew it. I forgot that I had to resort to relatively positioning the menu (placed in a table) so I'm now hung up on how to add the requisite code snippets for the "Place Menu" command for Version 3 and the actual menu items for the first row of the menu for Version 5. Is there a way to incorporate these into one of those cute little if/else thingies?
And, just to complicate things (sorry!), I tried your suggested code and received a javascript error "mt has no properties." Maybe I did something wrong?
Poster: kevin3442
Dated: Tuesday March 16 2004 - 2:16:03 GMT
innkeeper9 wrote:
...This code has the browser trying to load the file but it stops and gives a javascript error...
Hi Ruth,
Which example from the code I posted... the first or the second? (I confess to having posted the code without actually tring it first... )
Kevin
Poster: kevin3442
Dated: Tuesday March 16 2004 - 2:19:54 GMT
Hi Pavia,
pavia wrote:
...I forgot that I had to resort to relatively positioning the menu (placed in a table) so I'm now hung up on how to add the requisite code snippets for the "Place Menu" command for Version 3 and the actual menu items for the first row of the menu for Version 5. Is there a way to incorporate these into one of those cute little if/else thingies?
I'll have to look into that some...
Quote:
And, just to complicate things (sorry!), I tried your suggested code and received a javascript error "mt has no properties." Maybe I did something wrong?
Given Ruth's report combined with yours, it's more likely something I may have done wrong. Seems I have some testing to do. I'll get back to this thread a little later...
Kevin
Poster: Ruth
Dated: Tuesday March 16 2004 - 5:25:20 GMT
I'm sorry Kevin. I meant any of the code you gave here
Code:
<script language="javascript">
_NS4 = (document.layers) ? true : false;
if (_NS4) {
document.write("<scr"+"ipt language=JavaScript src=menu_array.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenu.js><\/scr"+"ipt>");
}
else {
document.write("<scr"+"ipt language=JavaScript src=milonic_src.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=menu_data.js><\/scr"+"ipt>");
}
</script> and then the other one with it split. Having part in the head and part in the body.
_NS4 = (document.layers) ? true : false;
if (_NS4) {
document.write("<scr"+"ipt language=JavaScript src=menu_array.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenu.js><\/scr"+"ipt>");
}
else {
document.write("<scr"+"ipt language=JavaScript src=milonic_src.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
document.write("<scr"+"ipt language=JavaScript src=menu_data.js><\/scr"+"ipt>");
}
</script> and then the other one with it split. Having part in the head and part in the body.
I tried:
1. With all the code in the head. Gives the error reference to the mmenu.js
2. Split between head and body. Same error message.
3. Tried just putting the coding you gave for the body to call v3 leaving out the reference to version 5 in the head. I get no error, and if you view source in nn4.79 you can see the coding is there but no menu loads, and I do have all the files in the same folder as the page, I'm doing it on the desktop.
Sorry, I wasn't more specific.
Ruth
Poster: pavia
Dated: Thursday March 18 2004 - 1:27:10 GMT
Kevin--did you have a chance to look into loading the relatively positioned Version 5 menu for browsers that "work" and the relatively positioned Version 3 menu for crappy Netscape? I feel like a pushy jerk asking for your assistance when you've already gone out of your way to help but I am sort of stuck now.
Poster: kevin3442
Dated: Thursday March 18 2004 - 1:37:51 GMT
Sorry Pavia, I um... well.... forgot about it
Gotta blaze right now, but I'll give it a shot tomorrow. Wouldn't hurt if you bump the topic with a quick reply tomorrow morning -- I'm GMT-6:00 -- just so the thread appears with a new post when I check the forum tomorrow.
No bother... I enjoy the puzzles (that's why I'm addicted to this forum )
Cheers,
Kevin
Poster: pavia
Dated: Thursday March 18 2004 - 12:23:54 GMT
Well, here I am, following Kevin's directions and bumping this topic.
Bump...bump...bump.
Okay, yes...I have nothing intelligent or clever to say.
Bumping done.
Poster: kevin3442
Dated: Thursday March 18 2004 - 20:30:20 GMT
Thanks for the bump. I'll have a look now.
Kevin
Poster: kevin3442
Dated: Thursday March 18 2004 - 22:43:54 GMT
Hi Pavia,
I've been messing with this for a while now and have not had much luck. v5 works fine. I can get the v3 menu to appear in NS4, but the rest of the page doesn't load afterward. I'm not an NS4 expert, but I know it has done some other quirky things on me when I've used document.write() in it before.
Anyway, I'm not admitting defeat yet, but I'm taking a break for now (before I break something) and I'll see if I can come up with any fresh ideas. In the meantime, you might consider Ruth's trick of using two different v5 menus, one for NS4 and one for everything else. A simple v5 menu (no fancy stuff) seems to run well in NS4.
Kevin
Poster: pavia
Dated: Thursday March 18 2004 - 23:14:24 GMT
Now I hate Netscape 4 even more.
You suggest using a simple V5 menu as an alternative...like, no fancy stuff.
Okay...what qualifies as fancy stuff? I'm so non-fancy it's embarassing.
Did my changing my "requirements"--needing this to work for a relatively-positioned menu in a table as opposed to a plain old horizontal one--complicate things? 'Cause if that's the case, I'll change! I'll change! Or is the whole loading-V3-or-loading-V5-based-on-the-browser thing just not do-able?
Whatever the outcome, I just want you to know how much I appreciate your help with this.
Poster: Ruth
Dated: Friday March 19 2004 - 3:44:03 GMT
Hi Pavia,
LINK REMOVED. This particular menu only has text because it's for the text section of my site, but I do have one with images, I just dont' do any fancy swap image or swap text like i do for the other version 5 file for other browsers. After all, nn4 is an older browser so I do the 'rule' kiss..keep it simple sam... But the off on colors work. Of course you might like something different than milonic default. This is just a test . I did find out I had to be real careful with the styles on my page. I had to redefine styles for TD to a .td class element because nn4 was reading and assigning that to the menu. Try the page in other than nn4 also, so you can see how different it is on the regular data file.
Poster: pavia
Dated: Friday March 19 2004 - 4:18:00 GMT
Ruth...hmmm...I tried the link you provided twice in Netscape 4.79 on the Macintosh. The first time, while mousing over links, my computer froze/crashed and I was forced to do a restart. Hey, it happens...coulda' been something else.
The second time, Netscape choked and quit on me. I'll give it a shot again tomorrow morning but I'm wondering what's up.
Poster: Ruth
Dated: Friday March 19 2004 - 4:27:39 GMT
Well, it may be a mac issue. It works fine for me, and I'd assume for Kevin since he worked it out. But, I'm on a pc, 98se. So, perhaps that code won't work on macs. It may be that you would have to have macs and nn4.79 ignore the menu and use text links, unless Kevin can get it to call the other version. Perhaps there's something in the code Kevin designed that the macs don't like? I know he had to actually take the drawmenus () out of the data file and put it in the call, perhaps that is something that the mac doesn't like.
Ruth
Poster: pavia
Dated: Friday March 19 2004 - 12:00:21 GMT
Sh*t. It happened a third time. The error message is that Netscape unexpectedly quit because of a Type 2 error.
Well, that explains it, huh?
Ahhh...the wonderful world of web design...
Poster: kevin3442
Dated: Friday March 19 2004 - 18:32:10 GMT
pavia wrote:
...Netscape 4.79 on the Macintosh
Well... there's a twist. I hadn't realized you were using a Mac (sorry... for not realizing it, not for the fact that you're using a Mac). Anything I try is in Windows. My default is Win2k. Don't even know where the nearest Mac might be, although it's definitely in a different building.
I did try a couple more things, but to no avail. The only things I can think of right now are:
(1) The only Type 2 error I know of has to do with statistics... so I can't help you out there.
(2) You could probably accomplish the goal of using a v3 menu for NS4 (Mac or otherwise) and a v5 menu for everything else using server-side scripting (php, asp, etc.). The script could serve a page that directly calls or embeds the correct menu code, rather than trying to figure it out with conditional tests and document.write()'s only on the client side... which NS4 doesn't seem to like very much in this case. Of course, that doesn't help you now, since you don't seem to be using any server-side script to generate pages. But right now, that's the only solution I can see. Are you able to do that?
Kevin
Poster: pavia
Dated: Friday March 19 2004 - 19:10:37 GMT
Hiya Kevin...
I can do server-side scripting--PHP. I even bought a book on it.
I'm a page 23.
I'm very good at disassembling and playing with other people's PHP scripts but that's about the extent of my abilities. As it stands, I was including the Version 5 menu via a PHP include so that if there were any changes to the first row of the embedded relatively-positioned menu, I would only have to change one file.
Um...how's your PHP skills?
Poster: Ruth
Dated: Friday March 19 2004 - 20:14:49 GMT
Hmm, Kevin, is there a way to modify the code you gave me that does work on the pc and I think also on macs not using nn4.79 [I've asked Maz to check] to include something so no menu loads on a mac using nn 4.79? I think I could then put just text links behind the menu for those browsers, right?
Ruth