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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing data to field from database then to another field

Status
Not open for further replies.

n0795

Programmer
Jul 30, 2001
136
US
I have this code which gets data from a form and puts it in a select box.
On the next line"at the bottom of this code" i have a text field which i would like to give a value of whatever the select box has in it eg:Select box ="Something" then text box will disply "something"
Any help would be great.

dim objRS

set objrs=objconn.execute("select * from categories")

if objrs.eof then
%>
<%
end if

do while not objrs.eof

'if just added make selected
if request.querystring(&quot;cat&quot;) = objrs(&quot;category&quot;) then
response.write &quot;<option selected value='&quot; & objrs(0) & &quot;'>&quot; & objrs(&quot;category&quot;)
else

response.write &quot;<option value='&quot; & objrs(0) & &quot;'>&quot; & objrs(&quot;category&quot;)

end if

objrs.movenext

loop

set objrs = nothing
set objconn = nothing
%>
</select>
<%
'added category notice
if len(request.querystring(&quot;cat&quot;)) > 0 then
Response.write &quot;<font color='&quot; & actioncolor & &quot;'>Movie added</font>&quot;
end if
'added link notice
if request.querystring(&quot;added&quot;) = &quot;link&quot; then
Response.write &quot;<font color='&quot; & actioncolor & &quot;'>Review Added</font>&quot;
end if
%>

<td>Title:</td>
<td><input type=&quot;text&quot; input size=&quot;50&quot; name=&quot;Title&quot; value=&quot;<%=Catergory%>&quot;></td>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top