Creating client-side dynamic dependent list boxes in ASP

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Creating client-side dynamic dependent list boxes in ASP

    I am trying to link two list boxes on a page using client side java. I am
    using Macromedia's Tech Note on this issue but still cannot get it to
    work...",0);
    }

    oList.selectedIndex = 0;
    }

    function MM_callJS(jsStr) { //v2.0
    return eval(jsStr)
    }
    //-->
    </script>


    </head>

    <body onLoad="MM_callJS('setDynaList(arrDL1)')">
    <form name="form1" method="post" action="">
    <p>
    <select name="selList1" id="selList1"
    onChange="MM_callJS('setDynaList(arrDL1)')">
    <%
    while (!EmpLookUp.EOF) {
    %>
    <option value="<%=(EmpLookUp.Fields.Item("ID").Value)%>"
    <%=((EmpLookUp.Fields.Item("ID").Value == 15018)?"SELECTED":"")%>
    ><%=(EmpLookUp.Fields.Item("ProviderName").Value)% ></option>
    <%
    EmpLookUp.MoveNext();
    }
    if (EmpLookUp.CursorType > 0) {
    if (!EmpLookUp.BOF) EmpLookUp.MoveFirst();
    } else {
    EmpLookUp.Requery();
    }
    %>
    </select>
    </p>
    <p>
    <select name="selList2" id="selList2">
    <%
    for (varLoopCounter = 1; varLoopCounter <= varMaxLength; varLoopCounter++){
    %>
    <option value = "<%=varMaxWidth%>"><%=varMaxWidth%></option>
    <%
    }
    %>
    </select>
    </p>
    </form>
    </body>
    </html>
    <%
    EmpLookUp.Close();
    %>
    <%
    ConLookUp.Close();
    %>


    Leckee Guest

  2. Similar Questions and Discussions

    1. Dynamic generation of list boxes based on user input
      This topic is similar to my last topic, but is slightly different. Again, I'm using session variables and a form wizard that takes the user...
    2. Client side dynamic graphing problem
      I am familiar with application programming, but only started web-programming a month ago. I want to have a graph on a webpage that the client can...
    3. Creating dynamic Text boxes in VB .Net
      Hi All :-) (I've posted at dotnet.languates.vb.controls, but not received any response since 11/5 - sorry for the doble-post, but I really could use...
    4. Client-side dependent menus
      Hi all, I'm trying to use a menu system in a form where the second menu is populated depending on what is chosen in the first (without returning...
    5. A selection changes on asp page with 6 dependent list boxes, when back
      Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date....
  3. #2

    Default Re: Creating client-side dynamic dependent list boxes in ASP

    use my extension.
    [url]http://www.kermy.com[/url]

    "Leckee" <webforumsuser@macromedia.com> wrote in message
    news:cvvm1n$6d$1@forums.macromedia.com...
    >I am trying to link two list boxes on a page using client side java. I am
    > using Macromedia's Tech Note on this issue but still cannot get it to
    > work...",0);
    > }
    >
    > oList.selectedIndex = 0;
    > }
    >
    > function MM_callJS(jsStr) { //v2.0
    > return eval(jsStr)
    > }
    > //-->
    > </script>
    >
    >
    > </head>
    >
    > <body onLoad="MM_callJS('setDynaList(arrDL1)')">
    > <form name="form1" method="post" action="">
    > <p>
    > <select name="selList1" id="selList1"
    > onChange="MM_callJS('setDynaList(arrDL1)')">
    > <%
    > while (!EmpLookUp.EOF) {
    > %>
    > <option value="<%=(EmpLookUp.Fields.Item("ID").Value)%>"
    > <%=((EmpLookUp.Fields.Item("ID").Value == 15018)?"SELECTED":"")%>
    >><%=(EmpLookUp.Fields.Item("ProviderName").Value) %></option>
    > <%
    > EmpLookUp.MoveNext();
    > }
    > if (EmpLookUp.CursorType > 0) {
    > if (!EmpLookUp.BOF) EmpLookUp.MoveFirst();
    > } else {
    > EmpLookUp.Requery();
    > }
    > %>
    > </select>
    > </p>
    > <p>
    > <select name="selList2" id="selList2">
    > <%
    > for (varLoopCounter = 1; varLoopCounter <= varMaxLength;
    > varLoopCounter++){
    > %>
    > <option value = "<%=varMaxWidth%>"><%=varMaxWidth%></option>
    > <%
    > }
    > %>
    > </select>
    > </p>
    > </form>
    > </body>
    > </html>
    > <%
    > EmpLookUp.Close();
    > %>
    > <%
    > ConLookUp.Close();
    > %>
    >
    >

    Anthony Brown Guest

  4. #3

    Default Creating client-side dynamic dependent list boxes in ASP

    i have been using this technote from macromedia for ages and it works
    perfectly...
    [url]http://www.macromedia.com/go/tn_19117[/url]

    however .. now i am introuble :(
    Access / dmx04 / asp vb

    in the application im developing, there is an endless parent / childs nods
    the child might be also a parent for another child . .. etc
    i'm wondering how can i create an unlimited dynamic drop down menus?

    please help :(




    Nazgyl Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139