Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Cascading Menus

  1. #1
    New Coder
    Join Date
    Jul 2003
    Location
    Perth WA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cascading Menus

    Hi All,

    What I want to do is create a cascading menu that reads from a database. I have searched through google and the likes and have come up with exactly nothing so my question is does anyone know where I can get some source code that creates a cascading menu that reads from a database??

    Any help on this would be greatly appreciated!!!

    Thanks

    Vicki
    When I die I want to go peacefully in my sleep - Just like my Grandfather did............not screaming like the passengers in his car......

  • #2
    Regular Coder
    Join Date
    Aug 2003
    Posts
    565
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Would that help? Is that what you try to do?

    Code:
       <%
       set rsName = Server.CreateObject("ADODB.RecordSet")
       rsName.Open "SELECT data FROM table", Conn
       %>   
          
          <SELECT name="nameOfTheDropdownList">
          <OPTION VALUE="defaultValue" SELECTED>all data:
          <% while not rsName.EOF %>
          <OPTION VALUE="<%=rsName.Fields("data").Value%>"><%=rsName.Fields("data").Value%>
          <%     
          rsName.moveNext
          wend
          %>
          </SELECT>
          
          
          
       <%
       rsName.Close
       set rsName = Nothing
       %>
    Last edited by jeskel; 11-11-2003 at 11:57 AM.


  •  

    Posting Permissions

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