dataplayer
Programmer
I am using Dream Weaver MX for an application form for parking space applicants. The applicant is supposed to choose a value from a list of car makes, and then to choose a car model from a listof car models. I want only those models under that car make to be listed.
I know how to select the car makes from the list, but don't know how to come up a list of models under the make. Could anyone help?
In the following is part of source code for selecting a make.
<% Set RS_CarMake = Server.CreateObject("ADODB.Recordset")
RS_CarMake.Open "Automake", park_conn, 2, 2
%>
<select name="REQappcarmake" onChange="ChangeDivision(0,'home',2);">
<option selected value="">Select A Make</option>
<%Do Until RS_CarMake.EOF%>
<option value="<%=RS_CarMake("veh_code")%>"><%=RS_CarMake("Make")%></option>
<%
RS_CarMake.MoveNext
Loop
%>
<option value="OT">Other</option>
</select>
<% RS_carmake.close
set RS_carmake = nothing %>
....
I am also including the model selecting part (the part to be improved) as follows:
<%
Set RS_model = Server.CreateObject("ADODB.Recordset")
SQL_model="select * from models
RS_model.Open SQL_model, park_conn, 2, 2
%>
<select name="select" onChange="ChangeDivision(0,'home',2);">
<option selected value="">Select A Model</option>
<%Do Until RS_model.EOF%>
<option value="<%=RS_model("modelID")%>"><%=RS_model("Model")%></option>
<%
RS_model.MoveNext
Loop
%>
<option value="OT">Other</option>
</select>
.....
Any hint and help are appreciated. Thanks.
Frank
I know how to select the car makes from the list, but don't know how to come up a list of models under the make. Could anyone help?
In the following is part of source code for selecting a make.
<% Set RS_CarMake = Server.CreateObject("ADODB.Recordset")
RS_CarMake.Open "Automake", park_conn, 2, 2
%>
<select name="REQappcarmake" onChange="ChangeDivision(0,'home',2);">
<option selected value="">Select A Make</option>
<%Do Until RS_CarMake.EOF%>
<option value="<%=RS_CarMake("veh_code")%>"><%=RS_CarMake("Make")%></option>
<%
RS_CarMake.MoveNext
Loop
%>
<option value="OT">Other</option>
</select>
<% RS_carmake.close
set RS_carmake = nothing %>
....
I am also including the model selecting part (the part to be improved) as follows:
<%
Set RS_model = Server.CreateObject("ADODB.Recordset")
SQL_model="select * from models
RS_model.Open SQL_model, park_conn, 2, 2
%>
<select name="select" onChange="ChangeDivision(0,'home',2);">
<option selected value="">Select A Model</option>
<%Do Until RS_model.EOF%>
<option value="<%=RS_model("modelID")%>"><%=RS_model("Model")%></option>
<%
RS_model.MoveNext
Loop
%>
<option value="OT">Other</option>
</select>
.....
Any hint and help are appreciated. Thanks.
Frank