Java Script Menu Drop Down List - 2nd Tier

Discussion in 'Javascript' started by Wasser, Aug 2, 2006.

  1. Wasser

    Wasser Guest

    Hi All;

    I'm redesigning my company's website framework and am using as a
    reference some old menu code as a basis. As you can see from the Java
    code below, I have the initial single-level drop menu working, but if
    anyone can help me in adding a 2nd Tier or subclass off each drop down
    menu, that would be greatly appreciated. I've tried adding a "sub"
    menu class w/o any luck.

    TIA,
    Steve

    if (navigator.appName=="Netscape"&&navigator.appVersion<"5")
    {
    document.write("<TABLE BORDER='0' cellspacing='0' cellpadding='0'
    width='100%'");
    document.write("<TR>");
    document.write("<TD bgcolor='#6699CC' width='15%' align='left'> <A
    HREF='http://www.site.com/about.htm'><font
    color='white'>Home</font></A></TD>");
    document.write("<TD bgcolor='#6699CC' width='15%' align='left'> | <A
    HREF='http://www.site.com/soft.htm'><font color='white'>About
    TAG</font></A></TD>");
    document.write("<TD bgcolor='#6699CC' width='15%'> | <A
    HREF='http://www.site.com/serv.htm'><font color='white'>News You Can
    Use</font></A></TD>");
    document.write("<TD bgcolor='#6699CC' width='15%'> | <A
    HREF='http://www.site.com/net.htm'><font color='white'>QueryNet
    Affiliated Partners</font></A></TD>");
    document.write("<TD bgcolor='#6699CC' width='15%'> | <A
    HREF='http://www.site.com/support.htm'><font color='white'>Customer
    Support Center</font></A></TD>");
    document.write("<TD bgcolor='#6699CC' width='15%'> | <A
    HREF='http://www.site.com/querynet.htm'><font color='white'>Service
    Solutions</font></A></TD>");
    document.write("<TD bgcolor='#6699CC' width='15%'> | <A
    HREF='http://www.site.com/net.htm'><font color='white'>Software
    Solutions</font></A></TD>");
    document.write("<TD bgcolor='#6699CC' width='15%'> | <A
    HREF='http://www.site.com/net.htm'><font color='white'>Contact
    Us</font></A></TD>");
    document.write("<TD bgcolor='#6699CC' width='60%'>&nbsp;</TD>");
    document.write("</TR>");
    document.write("</TABLE>");
    }
    else
    {
    document.write("<DIV ID='divMenuBar'>");
    document.write("<TABLE ID='tblMenuBar' BORDER='0'>");
    document.write("<TR>");
    if(navigator.appName=="Netscape"&&navigator.appVersion>="5")
    {
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem1'> <A
    HREF='http://www.site.com/about.htm'>Home</A></TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem2'>| <A
    HREF='http://www.site.com/soft.htm'>About TAG</A></TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem3'>| <A
    HREF='http://www.site.com/serv.htm'>News You Can Use </A></TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem4'>| <A
    HREF='http://www.site.com/net.htm'>QueryNet Affliated
    Partners</A></TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem5'>| <A
    HREF='http://www.site.com/support.htm'>Customer Support
    Center</A></TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem6'>| <A
    HREF='http://www.site.com/support.htm'>Service Solutions</A></TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem7'>| <A
    HREF='http://www.site.com/support.htm'>Software Solutions</A></TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem8'>| <A
    HREF='http://www.site.com/index.htm'>Contact Us</A></TD>");
    }
    else
    {
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem1'>
    Home</TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem2'>
    About TAG</TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem3'>
    News You Can Use</TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem4'> Net
    Affiliated Partners</TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem5'>
    Customer Support Center</TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem6'>
    Service Solutions</TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem7'>
    Software Solutions</TD>");
    document.write("<TD class='clsMenuBarItem' id='tdMenuBarItem8'>
    Contact Us</TD>");
    }
    document.write("</TR>");
    document.write("</TABLE>");
    document.write("</DIV>");
    document.write("<DIV CLASS='clsMenu' ID='divMenu1'>");
    document.write("<DIV CLASS='clsMenuSpacer'></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/index.htm'>Home</A></DIV>");
    document.write("</DIV>");
    document.write("<DIV CLASS='clsMenu' ID='divMenu2'>");
    document.write("<DIV CLASS='clsMenuSpacer'></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Analytical_1.htm'>About
    Analytical</A></DIV>");
    document.write("<DIV><A HREF='http://www.site.com/People_1.htm'>Our
    People</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Careers_1.htm'>Careers With Us</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Contact_1.htm'>Contact Us</A></DIV>");
    document.write("</DIV>");
    document.write("<DIV CLASS='clsMenu' ID='divMenu3'>");
    document.write("<DIV CLASS='clsMenuSpacer'></DIV>");
    document.write("<DIV><A HREF='http://www.site.com/News_1.htm'>News &
    Events</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Links_1.htm'>Industry Links</A></DIV>");
    document.write("<DIV><A HREF='http://www.site.com/Usersg_1.htm'>Join
    a User's Group</A></DIV>");
    document.write("<DIV><A HREF='http://www.site.com/Survey_1.htm'>Take
    Our Survey</A></DIV>");
    document.write("</DIV>");
    document.write("<DIV CLASS='clsMenu' ID='divMenu4'>");
    document.write("<DIV CLASS='clsMenuSpacer'></DIV>");
    document.write("<DIV><A HREF='http://www.site.com/QNName_1.htm'>By
    Name and Locations</A></DIV>");
    document.write("<DIV><A HREF='http://www.site.com/QNSvce_1.htm'>By
    Services Provided</A></DIV>");
    document.write("<DIV><A HREF='http://www.site.com/QNForm_1.htm'>Net
    Contact Form</A></DIV>");
    document.write("</DIV>");
    document.write("<DIV CLASS='clsMenu' ID='divMenu5'>");
    document.write("<DIV CLASS='clsMenuSpacer'></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Techsup_1.htm'>Technical Support</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Downloads_1.htm'>Software
    Downloads</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/FAQs_1.htm'>Questions and Answers
    (FAQ's)</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Training_1.htm'>Training</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Tools_1.htm'>Tools</A></DIV>");
    document.write("<DIV><A HREF='http://www.site.com/Tips_1.htm'>Tips &
    Tricks</A></DIV>");
    document.write("</DIV>");
    document.write("<DIV CLASS='clsMenu' ID='divMenu6'>");
    document.write("<DIV CLASS='clsMenuSpacer'></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Fieldcntr_1.htm'>Field Centers</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Websurvey_1.htm'>Web Surveys</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Datacap_1.htm'>Data Capture</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Datapro_1.htm'>Data Processing</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Statcon_1.htm'>Statistical
    Consulting</A></DIV>");
    document.write("</DIV>");
    document.write("<DIV CLASS='clsMenu' ID='divMenu7'>");
    document.write("<DIV CLASS='clsMenuSpacer'></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Cross_1.htm'>Cross</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Query_1.htm'>Query</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Query_1.htm'>Query</A></DIV>");
    document.write("<DIV><A HREF='http://www.site.com/Demos_1.htm'>Demo
    & Pricing</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Purchase_1.htm'>Purchase Our
    Products</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/T&S_1.htm'>Training & Support</A></DIV>");
    document.write("</DIV>");
    document.write("<DIV CLASS='clsMenu' ID='divMenu8'>");
    document.write("<DIV CLASS='clsMenuSpacer'></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/Contactdetails_1.htm'>Contact
    Details</A></DIV>")
    document.write("<DIV><A
    HREF='http://www.site.com/Directions_1.htm'>Get Directions</A></DIV>");
    document.write("<DIV><A
    HREF='http://www.site.com/form/feedback/Information_1.html'>Feedback
    Form</A></DIV>");
    document.write("</DIV>");
    }
     
    Wasser, Aug 2, 2006
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.