Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populating an input textbox with a value from dropdown - still struggl

Status
Not open for further replies.

chinedu

Technical User
Mar 7, 2002
241
US
I have been trying to populate an input textbox with an id associated with a value selected from a dropdown list box.

So far, it doesn't matter what value I select from the dropdown listbox, an input textbox always gets populated with the same id.

Please take a look and tell where I am err'ing here.

Thanks in advance

[/code]
<td align="left"><font size="2" color="Black" face="Arial"><b>Project Name:</b></font></td>
<td><select name="TxtprojectName" size="1" onChange="document.sidewalk.TxtsysID.value = this.value;">
<option selected>&lt;Choose One&gt;</option>
<%
dim Conn,SQLstr
Function OpenDBFConn(Path)
Dim Conn: Set Conn = CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Path & ";" & _
"Extended Properties=""DBASE IV;"";"
Set OpenDBFConn = Conn
End Function

Dim DBConn
Set DBConn = OpenDBFConn("c:\arcgis")
'Open recordset from inventory table

Dim rs
Set rs = DBConn.Execute("SELECT * FROM cline.dbf order by system_id")

While not rs.EOF

%>

<OPTION value="<% =rs("system_ID") %>"><% =rs("full_name") %></OPTION>

<%

rs.MoveNext

wend

rs.close

set rs=nothing
%>
</select></td>
<td align="right" nowrap><font size="2" color="Black" face="Arial"><i>System ID:</i></font></td>
<td><input type="text" name="TxtsysID" id="TxtsysID" size="5" value=""></td>
[/code]
 
Never mind about this.
I was wrong -- it works.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top