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><Choose One></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]
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><Choose One></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]