Forums

This topic is locked

Dynamic List boxes and filtering on the same page

Posted 23 Jan 2002 14:56:52
1
has voted
23 Jan 2002 14:56:52 I Mahomed posted:
Ok i got 2 listboxes
1 where you select type based on that a second list box is populated i tried the standard dw jump menu and dynamic list box but problem comes in when you select on of the types u get the second list box filtered out BUT you cant choose the FIRST type from the First Listbox , i have worked around this by providing a "go" button so you can select the first record in the first list box and click go which works but is there any other way ?

Also on an update page how can you make the default correspond to the entry in the database if at all possible ?

Replies

Replied 23 Jan 2002 15:12:38
23 Jan 2002 15:12:38 I Mahomed replied:
ok, got rid of the go button like below , the only question , how do i automatically select the current record

CODE---------------------"
<tr>
<td class="Table" width="21%">What type of link/Article is this?</td>
<td width="79%">
<select name="Type" onChange="MM_jumpMenu('parent',this,0)" class="Fields">
<option value="#" selected>Please Select Article Type</option>
<%
While (NOT rsType.EOF)
%>
<option value="updatearticle.asp?PRID=<%= Request.QueryString("PRID" & "&TID=" & (rsType.Fields.Item("T_ID".Value)%>" ><%=(rsType.Fields.Item("T_Title".Value)%></option>
<%
rsType.MoveNext()
Wend
If (rsType.CursorType > 0) Then
rsType.MoveFirst
Else
rsType.Requery
End If
%>
</select>
<input type="hidden" name="hdnTID" value="<% = Request.Querystring("TID" %>">
Current: <%=(rsArticle.Fields.Item("T_Title".Value)%></td>
</tr>
<tr>
<td class="Table" width="21%">Select Category</td>
<td width="79%">
<select name="sctCat" class="Fields">
<% If rsArtCat.EOF And rsArtCat.BOF Then %>
<option value="#" selected>No Type Selected</option>
<% Else %>
<%
While (NOT rsArtCat.EOF)
%>
<option value="<%=(rsArtCat.Fields.Item("AC_ID".Value)%>" ><%=(rsArtCat.Fields.Item("AC_Title".Value)%></option>
<%
rsArtCat.MoveNext()
Wend
If (rsArtCat.CursorType > 0) Then
rsArtCat.MoveFirst
Else
rsArtCat.Requery
End If
%>
<% End If ' end rsArtCat.EOF And rsArtCat.BOF %>
</select>

Current: <%=(rsArticle.Fields.Item("AC_Title".Value)%> </td>
</tr>
--------------"

Reply to this topic