Solved

Filter Dynamic List/Menu in Dreamweaver on second List/Menu dropdown

Posted on 2008-10-21
4
625 Views
Last Modified: 2013-12-25
I am creating an ASP vbScript web page connected to a Microsoft Access database using Dreamweaver MX 2004. I am comfortable with using the Dreamweaver menu tools for this, though I am not as strong with the ASP coding.

I have a candidate that I choose from a dynamic list/menu drop down. The candidate is populated from a query in the database. When the candidate is selected, I would like to filter staff from the same company. I may not have the right fields in my dynamic code, but is this possible on an ASP web page?

I would like to filter the choses of staff that are in a second list/menu drop down.


<% CANDIDATE LIST/MENU CODE %>

<select name="candidate" size="1" id="select4">

          <%

While (NOT CandidateChoice.EOF)

%>

          <option value="<%=(CandidateChoice.Fields.Item("CandidateID").Value)%>"><%=(CandidateChoice.Fields.Item("CandidateChoice").Value)%></option>

          <%

  CandidateChoice.MoveNext()

Wend

If (CandidateChoice.CursorType > 0) Then

  CandidateChoice.MoveFirst

Else

  CandidateChoice.Requery

End If

%>

        </select>

<% STAFF LIST/MENU CODE %>

<select name="staff" id="select5">

          <%

While (NOT StaffChoice.EOF)

%>

          <option value="<%=(StaffChoice.Fields.Item("StaffID").Value)%>"><%=(StaffChoice.Fields.Item("StaffChoice").Value)%></option>

          <%

  StaffChoice.MoveNext()

Wend

If (StaffChoice.CursorType > 0) Then

  StaffChoice.MoveFirst

Else

  StaffChoice.Requery

End If

%>

        </select>

Open in new window

0
Comment
Question by:mikebollinger
  • 2
4 Comments
 
LVL 25

Expert Comment

by:Rouchie
Comment Utility
You need to get the first drop down list to cause a form post when the selected index is changed.  I'm not sure if DW can do this (try the behaviors panel), so you might have to dig into the code yourself.

There's a code tutorial on this type of thing here: http://www.plus2net.com/asp-tutorial/db-dropdown.php

0
 
LVL 70

Expert Comment

by:Jason C. Levine
Comment Utility
Dreamweaver does not have this as a standard behavior but there are extensions that add it.  However, you may not be able to easily find them for MX 2004.
0
 

Accepted Solution

by:
mikebollinger earned 0 total points
Comment Utility
I found my own solution using WebAssist Dynamic Dropdown. I considered your solution, Rouchie, but the example indicated testing for javascript enablement. I didn't want to have any compatibility issues due to internet security settings.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
Comment Utility
mikebollinger,

I didn't realize that the WebAssist stuff still works with MX 2004.  Good information to have.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Simple Mosaic Web Library 8 60
Select distinct 25 60
API Soap Calls 4 55
Unexpected HttpURLConnection connection behavior 2 46
Uploading files to the web server has become common part of almost any kind of web application. People use different technologies to solve this, but regardless of the technology used, it is always useful to have some kind of progress indicator shown…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now