Solved

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

Posted on 2008-10-21
4
633 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
ID: 22765728
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
ID: 22772004
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
ID: 22772121
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
ID: 22772173
mikebollinger,

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

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
If-Then-Else ASP problem 6 59
Show banners that are blocked by Ad Muncher 10 56
Adwords and keywords 2 35
how to see all occupied ports on windows 10 laptop 15 64
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

776 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