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: Select all
<script language="javascript">
_NS4 = (document.layers) ? true : false;
if (_NS4) {
document.write("<a href="http://websites.milonic.com/citytech.cuny.edu/aboutus/index.html>About Us</a> | ");
document.write("<a href="http://websites.milonic.com/citytech.cuny.edu/academics/index.html> Academics</a> | ");
document.write("<a href="http://websites.milonic.com/citytech.cuny.edu/admissions/index.html>Admissions</a> | ");
document.write("<a href="http://websites.milonic.com/citytech.cuny.edu/alumni/index.html>Alumni</a> | ");
document.write("<a href="http://websites.milonic.com/citytech.cuny.edu/faculty/index.html>Faculty/Staff</a> | ");
document.write("<a href="http://websites.milonic.com/citytech.cuny.edu/students/index.html>Students</a> | ");
document.write("<a href="http://websites.milonic.com/citytech.cuny.edu/search/index.html>Search</a> | ");
document.write("<a href="http://websites.milonic.com/citytech.cuny.edu/sitemap/index.html>Site Map</a> | ");
document.write("<a href="http://websites.milonic.com/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>");