This topic is locked

dyanmic drop down selection

3/20/2005 11:26:41 PM
ASPRunnerPro General questions
D
Derek author

For the code below how can I make the City drop down change based on selection from the Province drop down ?
<!-- Province -->

<tr class=shade>

<td><%=Label("Province")%></td>

<input type="hidden" id="FieldName" name="FieldName" value="Province">

<input type=hidden name=NeedQuotes<%= BuildFieldName("Province") %> value="<%= Request.Form("NeedQuotes" & BuildFieldName("Province")) %>">
<input type=hidden ID=SearchOption NAME=SearchOption value="Equals">
<td width=230>
<!--<input type=text size=20 name=SearchFor>-->

<% Response.Write BuildSearchControl("Province", Session("SearchFor1_" & strTableName & "_Province"),"") %>

</td>
<td width=230>

<span id="sp_Province">

<%

sFormat = GetEditFormat("Province")

if sFormat="" then sFormat=EDIT_FORMAT_TEXT_FIELD

if sFormat=EDIT_FORMAT_TEXT_FIELD or sFormat=EDIT_FORMAT_DATE or sFormat = EDIT_FORMAT_HIDDEN or sFormat = EDIT_FORMATREADONLY then

Response.Write BuildSearchControl("Province", Session("SearchFor2
" & strTableName & "_Province"),"999")

end if

%>

</span>

</td>
</tr>
<!-- City -->

<tr class=shade>

<td><%=Label("City")%></td>

<input type="hidden" id="FieldName" name="FieldName" value="City">

<input type=hidden name=NeedQuotes<%= BuildFieldName("City") %> value="<%= Request.Form("NeedQuotes" & BuildFieldName("City")) %>">
<input type=hidden ID=SearchOption NAME=SearchOption value="Equals">
<td width=230>
<!--<input type=text size=20 name=SearchFor>-->

<% Response.Write BuildSearchControl("City", Session("SearchFor1
" & strTableName & "_City"),"") %>

</td>
<td width=230>

<span id="sp_City">

<%

sFormat = GetEditFormat("City")

if sFormat="" then sFormat=EDIT_FORMAT_TEXT_FIELD

if sFormat=EDIT_FORMAT_TEXT_FIELD or sFormat=EDIT_FORMAT_DATE or sFormat = EDIT_FORMAT_HIDDEN or sFormat = EDIT_FORMATREADONLY then

Response.Write BuildSearchControl("City", Session("SearchFor2
" & strTableName & "_City"),"_999")

end if

%>

</span>

</td>
</tr>

Sergey Kornilov admin 3/23/2005

Derek,
here is the topic where I explain how to build dynamic dro-down boxes.