www.webdeveloper.com
Results 1 to 3 of 3

Thread: Double Pulldown Menu

  1. #1
    Join Date
    Nov 2002
    Posts
    19

    Question Double Pulldown Menu

    Hi,
    I need to put 2 sets of double drop down menus on one page (http://javascript.internet.com/navigation/menu-double.htm). How do I do this? The second one works correctly, but the first one, after you select an item from the first list, the second menu (in the first set) displays the options from the second set of menus instead of the correct ones. Hope I didn't confuse you too much.

    Any help would be greatly appreciated!

    Thanks!

  2. #2
    Join Date
    Nov 2002
    Posts
    11

    weatherman2525

    I seen the scrip you picked up but I need to see the scrip that you have changed to meet your site pref please post srip you have entered your details in or send it me at

    webmaster@ismymail.zzn.com

    Ill see if I can fix it.........................












    Free personals no sign up Always free click here

    Voice your opinion today in our free forum on pollitics

    Selling a car? post it here for free limited time only get your space now
    Webhelper

  3. #3
    Join Date
    Nov 2002
    Posts
    11

    weatherman2525

    <HTML>
    <HEAD>
    <title>Peace Bear World</title>


    <!----------this is the varable scrip it cannot be called twice within a page or it will cause conflict in the value and usualy which ever scrip calling the variables first will have dominaition over any other scrip like it within the <head>and</head> tags.....this was the only way i could get this to work with all categories that you had listed......it may even be less confusing for someone viewing the page to only have to select from two drop down menues rather than four----------------------------------------------you can remove this tag after you have read this-------------------->


    <!-------variable scrip begin----------------------------------------->

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    v=false;
    //-->
    </SCRIPT>

    <SCRIPT LANGUAGE="JavaScript1.1">
    <!--
    if (typeof(Option)+"" != "undefined") v=true;
    //-->
    </SCRIPT>

    <SCRIPT LANGUAGE="JavaScript">

    <!-- Begin
    if(v){a=new Array();aln=0;}
    function getFormNum (formName) {
    formNum =-1;
    for (i=0;i<document.forms.length;i++){
    tempForm = document.forms[i];
    if (formName == tempForm) {
    formNum = i;
    correctForm = tempForm;
    break;
    }
    }
    return formNum;
    }
    function jmp(formName,elementNum) {
    getFormNum(formName);
    if (formNum>=0) {
    with (document.forms[formNum].elements[elementNum]) {
    i=selectedIndex;
    if (i>=0) location=options[i].value;
    }
    }
    }
    function O(txt,url) {
    a[k]=new Option(txt,url);k++;
    }
    function relate(formName,elementNum,j) {
    if(v) {
    k=1;
    if(j==0) { // default category item
    a=new Array();
    O("----------- Choose a Page ----------->","");
    }

    if(j==1) { // 1st category items
    a=new Array();
    O("------ Choose a Page ------>","");
    O("Page 1","http://www.peacebearworld.com/galleries/peace01page01.htm");
    O("Page 2 (updated 10/20/02)","http://www.peacebearworld.com/galleries/peace01page02.htm");
    O("Page 3 (updated 11/14/02)","http://www.peacebearworld.com/galleries/peace01page03.htm");
    O("Page 4","http://www.peacebearworld.com/galleries/peace01page04.htm");
    }

    if(j==2) { // 2nd category items
    a=new Array();
    O("------ Choose a Page ------>","");
    O("Page 1 (updated 10/20/02)","http://www.peacebearworld.com/galleries/peace02page01.htm");
    O("Page 2","http://www.peacebearworld.com/galleries/peace02page02.htm");
    }

    if(j==3) { // 3rd category items
    a=new Array();
    O("------ Choose a Page ------>","");
    O("Page 1 (updated 10/20/02)","http://www.peacebearworld.com/galleries/peace03page01.htm");
    O("Page 2 (updated 11/14/02)","http://www.peacebearworld.com/galleries/peace03page02.htm");
    O("Page 3 (updated 11/14/02)","http://www.peacebearworld.com/galleries/peace03page03.htm");
    O("Page 4","http://www.peacebearworld.com/galleries/peace03page04.htm");
    }

    if(j==4) { // 4th category items
    a=new Array();
    O("------ Choose a Page ------>","");
    O("Page 1 (updated 10/20/02)","http://www.peacebearworld.com/galleries/peace04page01.htm");
    }

    if(j==5) { // 5th category items
    a=new Array();
    O("------ Choose a Page ------>","");
    O("Page 1 (updated 11/14/02)","http://www.peacebearworld.com/galleries/peace05page01.htm");
    O("Page 2 (updated 11/14/02)","http://www.peacebearworld.com/galleries/peace05page02.htm");
    }


    if(j==6) { // 6th category items
    a=new Array();
    O("------ Choose a Page ------>","");
    O("Page 1 (updated 11/14/02)","http://www.peacebearworld.com/galleries/peace06page01.htm");
    O("Page 2","http://www.peacebearworld.com/galleries/peace06page02.htm");
    }


    if(j==7) { // 7th category items
    a=new Array();
    O("------ Choose a Page ------>","");
    O("Page 1","http://www.peacebearworld.com/galleries/peace07page01.htm");
    O("Page 2 (updated 11/14/02)","http://www.peacebearworld.com/galleries/peace07page02.htm");
    }


    if(j==8) { // 8th category items
    a=new Array();
    O("------ Choose a Page ------>","");
    O("Page 1 (updated 11/14/02)","http://www.peacebearworld.com/galleries/peace08page01.htm");
    O("Page 2","http://www.peacebearworld.com/galleries/peace08page02.htm");
    O("Page 3","http://www.peacebearworld.com/galleries/peace08page03.htm");
    }


    if(j==9) { // 9th category items
    a=new Array();
    O("------ Choose a Page ------>","");
    O("Page 1","http://www.peacebearworld.com/galleries/peace09page01.htm");
    O("Page 2 (updated 11/14/02)","http://www.peacebearworld.com/galleries/peace09page02.htm");
    }


    if(j==10) { // 10th category items
    a=new Array();
    O("------ Choose a Page ------>","");
    O("Page 1","http://www.peacebearworld.com/galleries/peace10page01.htm");
    }

    if(j==11) { // 1st category items
    a=new Array();
    O("----- Choose a Page ----->","");
    O("Page 1","http://www.peacebearworld.com/galleries/collectorlapage01.htm");
    }
    if(j==12) { // 12th category items
    a=new Array();
    O("----- Choose a Page ----->","");
    O("Page 1","http://www.peacebearworld.com/galleries/collectorsandypage01.htm");
    O("Page 2","http://www.peacebearworld.com/galleries/collectorsandypage02.htm");
    O("Page 3","http://www.peacebearworld.com/galleries/collectorsandypage03.htm");
    O("Page 4","http://www.peacebearworld.com/galleries/collectorsandypage04.htm");
    O("Page 5 (updated 11/13/02)","http://www.peacebearworld.com/galleries/collectorsandypage05.htm");
    O("Page 6 (updated 11/13/02)","http://www.peacebearworld.com/galleries/collectorsandypage06.htm");
    }

    if(j==13) { // 13th category items
    a=new Array();
    O("----- Choose a Page ----->","");
    O("Page 1 (updated 11/5/02)","http://www.peacebearworld.com/galleries/collectorsuepage01.htm");
    O("Page 2 (updated 11/10/02)","http://www.peacebearworld.com/galleries/collectorsuepage02.htm");
    O("Page 3 (updated 11/18/02)","http://www.peacebearworld.com/galleries/collectorsuepage03.htm");
    O("Page 4","http://www.peacebearworld.com/galleries/collectorsuepage04.htm");
    }

    if(j==14) { // 14th category items
    a=new Array();
    O("----- Choose a Page ----->","");
    O("Page 1","http://www.peacebearworld.com/galleries/collectortompage01.htm");
    O("Page 2","http://www.peacebearworld.com/galleries/collectortompage02.htm");
    }

    if(j==15) { // 15th category items
    a=new Array();
    O("----- Choose a Page ----->","");
    O("Page 1","http://www.peacebearworld.com/galleries/collectorotherpage01.htm");
    O("Page 2","http://www.peacebearworld.com/galleries/collectorotherpage02.htm");
    O("Page 3","http://www.peacebearworld.com/galleries/collectorotherpage03.htm");
    O("Page 4","http://www.peacebearworld.com/galleries/collectorotherpage04.htm");
    }
    aln2=a.length;
    getFormNum(formName);
    if (formNum>=0) {
    formNum = formNum + 1;
    with (document.forms[formNum].elements[elementNum]) {
    for (var i=options.length-1;i>0;i--) options[i]=null;
    for (var i=1;i<aln2;i++) options[i-1]=a[i];
    options[0].selected=true;
    }
    }
    } else {
    jmp(formName,elementNum);
    }
    }
    // End -->
    </SCRIPT>

    <!-------variable scrip end---------------------------------------->




    <!-----------------------Drop down selection begin------------------->

    </head>
    <body>
    <center>
    <table border=0>
    <tr valign=top>
    <TD align=center><form name=f1 method=post action="" onSubmit="return false;">
    <select name=m1 onChange="relate(this.form,0,this.selectedIndex); document.f2.m2.focus();">
    <option value="1">------- Choose a Category ------>
    <option value="2">Indonesian Neons
    <option value="3">Indonesian Pastels
    <option value="4">4th Gen. Deutschlands
    <option value="5">4th Gen. Fareham Hants
    <option value="6">Pastel 101's & 102's
    <option value="7">5th Gen. No #'d Neons
    <option value="8">5th Gen. Neon 102's
    <option value="9">Neon 107's, 108's & 110's
    <option value="10">Neon 114's, 115's, 116's & 119's
    <option value="11">All Ty Inc. (Lower Case) Peace
    <option value="12">Laurie-Ann's Bears
    <option value="13">Sandy's Bears
    <option value="14">Sue's Bears
    <option value="15">Tom's Bears
    <option value="16">Other Collectors' Bears
    </select></form></td>

    <td align=center><font size=4><font color=11A006>then</font></td>

    <td><form name=f2 method=post action="" onsubmit="return false;">
    <select name="m2" onchange="jmp(this.form,0)">
    <option value="/"> ------ Choose a Page ------>

    </select></form>



    <!-----------------------Drop down selection end------------------->


    </td>

    </tr>
    </table>
    </center><p>
    </body>
    </HTML>








    Let me know if this works for you...........












    Free personals no sign up Always free click here

    Voice your opinion today in our free forum on pollitics

    Selling a car? post it here for free limited time only get your space now
    Webhelper

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles