|
 |
asp_web_howto thread: geting textbox value onChange of listbox value from database
Message #1 by "Akshatha Ravindranath" <aksh681@h...> on Fri, 14 Feb 2003 06:38:37
|
|
on my form, i have a listbox, which displays flight numbers, whose values
have been retreived from a database. so, when i change the value of the
listbox, it should get the corresponding flight time which is in the same
table as the flight number. how do i do this. my code's below:
<select name="selectFno" style="color: #FFFFFF; background-color:
#008000" tabindex="1">
<option value="" selected>Choose One</option>
<%
While (NOT ChkRS.EOF)
%>
<option value="<%=(ChkRS.Fields.Item
("Flight_No").Value)%>"><%=(ChkRS.Fields.Item("Flight_No").Value)%
></option>
<%
ChkRS.MoveNext()
Wend
If (ChkRS.CursorType > 0) Then
ChkRS.MoveFirst
Else
ChkRS.Requery
End If
%>
</select>
</td>
<td><label>Flight Timing : </label>
<input type="text" name="txttime">
</td>
</table>
i want it display the corresponding flight time in "txttime"
please could you help
Message #2 by "kostas lagos" <klag@i...> on Fri, 14 Feb 2003 09:10:21 +0200
|
|
>From what i can understand the solution you are looking for lies on
Javascript.You can capture the onChange event and perform any actions you
need.Check out the following sites to get guided:
http://www.faqts.com/knowledge_base/index.phtml/fid/53
Cheers
Kostas Lagos
----- Original Message -----
From: "Akshatha Ravindranath" <aksh681@h...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Friday, February 14, 2003 6:38 AM
Subject: [asp_web_howto] geting textbox value onChange of listbox value from
database
> on my form, i have a listbox, which displays flight numbers, whose values
> have been retreived from a database. so, when i change the value of the
> listbox, it should get the corresponding flight time which is in the same
> table as the flight number. how do i do this. my code's below:
>
> <select name="selectFno" style="color: #FFFFFF; background-color:
> #008000" tabindex="1">
> <option value="" selected>Choose One</option>
> <%
> While (NOT ChkRS.EOF)
> %>
> <option value="<%=(ChkRS.Fields.Item
> ("Flight_No").Value)%>"><%=(ChkRS.Fields.Item("Flight_No").Value)%
> ></option>
> <%
> ChkRS.MoveNext()
> Wend
> If (ChkRS.CursorType > 0) Then
> ChkRS.MoveFirst
> Else
> ChkRS.Requery
> End If
> %>
> </select>
> </td>
> <td><label>Flight Timing : </label>
> <input type="text" name="txttime">
> </td>
> </table>
>
> i want it display the corresponding flight time in "txttime"
> please could you help
>
>
>
>
|
|
 |