Results 1 to 6 of 6

Thread: two select menus on same page

  1. #1
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    798
    Thanks
    86
    Thanked 2 Times in 2 Posts

    Default two select menus on same page

    1) Script Title: chained select menu

    2) Script URL (on DD): http://dynamicdrive.com/dynamicindex...menu/index.htm

    3) Describe problem: how is it possible to have two menus on the same page, please ?

  2. #2
    Join Date
    Mar 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey chechu,

    I just copied the config.js and renamed it to config2.js...
    Then i changed the values in config2.js the way i wanted it and included the
    new js script in my form.

    It works perfectly.
    But i don't know if this is the best way to get another chained select?!?!?!?


    Because you also working with the chained select sript, you maybe could give me an answer to my question?
    http://www.dynamicdrive.com/forums/s...ad.php?t=43233

    Thanks in advance...

    jenson

  3. #3
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    798
    Thanks
    86
    Thanked 2 Times in 2 Posts

    Default

    What do I need to change in the form ?
    Code:
    <form name="listmenu0">
    <select name="firstlevel"></select>
    <select name="secondlevel"></select><br>
    <select name="thirdlevel"></select>
    <select name="fourthlevel"></select><br>
    <select name="fifthlevel"></select>
    <input type="submit" value=" bekijk je keuze" onclick="goListGroup(document.listmenu0.firstlevel, document.listmenu0.secondlevel, document.listmenu0.thirdlevel, document.listmenu0.fourthlevel, document.listmenu0.fifthlevel)">  
    </form>
    Can you place your code here of the two forms you have on the same page, please ?

    Can't help you with your question regarding MySQL; never used it.

  4. #4
    Join Date
    Mar 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey chechu,

    unlike you, i put the "onclick" element into the <body> tag.

    Mine Body Tag looks like this:

    Code:
    <body bgcolor="#72144F" 
    onload="initListGroup('chainedmenu', document.Formular.WGR, document.Formular.UGR, document.Formular.TYP);initListGroup('chainedmenu_2', document.Formular.LF, document.Formular.HERKUNFT,document.Formular.LFARTGRP)" link="#72144F" vlink="#72144F" alink="#72144F">
    In my form config.js belongs to 'chainedmenu' and config2.js belongs to 'chainedmenu_2'....

    This is the name you need to define in the config.js.
    If you don't rename the menue in config2.js, only one chained select menue will be activated.

    Greetz

    jenson

  5. #5
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    798
    Thanks
    86
    Thanked 2 Times in 2 Posts

    Default

    Okay, so you use the body onload as you attached. But how does the form know what chainedmenu to follow ? Can you please place a link to your site where you use this, so I can have a look at your codes. Thanks.

  6. #6
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    798
    Thanks
    86
    Thanked 2 Times in 2 Posts

    Default

    Jenson, could you please paste your codes, here,
    so I can have a look at them to find out what you mean. Thanks !

Bookmarks

Posting Permissions

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