Ok, I have a drop down list that is populated with the client's first and last name from the database. What I want is to have the preceding text box's such as their title, email, address, etc. (other columns in the table) to change when a user selects the approriate name.
I am able to get the client information to work, but am unable to change the info. Here is my some of the code:
strSQL3= "Select * from Client where Client.Last_Name like '%" & url & "%'"
<SCRIPT LANGUAGE="JavaScript">
<!--
function menu_goto(menuform)
{
selecteditem = menuform.requested_by.selectedIndex;
url = menuform.requested_by.options[selecteditem].value;
if (url.length != 0)
{
location.href = url;
}
}
//-->
</SCRIPT>
<SELECT size=1 name=requested_by onchange="menu_goto(this.form)">
<%
rstSearch2.Open strSQL2, Conn, adOpenKeyset, adLockOptimistic, adCmdText
do while not rstSearch2.EOF
%>
<option><%=rstsearch2.fields("LAST_NAME").value%></option>
<%rstSearch2.movenext
loop
rstSearch2.close
set rstSearch2 = nothing
response.flush
%>
<INPUT type="text" name=ctitle value="<%= Server.HTMLEncode(rstSearch3.Fields("ctitle").Value) %>" size="25">
LMK if you need any more information. Thanks in advance.
I am able to get the client information to work, but am unable to change the info. Here is my some of the code:
strSQL3= "Select * from Client where Client.Last_Name like '%" & url & "%'"
<SCRIPT LANGUAGE="JavaScript">
<!--
function menu_goto(menuform)
{
selecteditem = menuform.requested_by.selectedIndex;
url = menuform.requested_by.options[selecteditem].value;
if (url.length != 0)
{
location.href = url;
}
}
//-->
</SCRIPT>
<SELECT size=1 name=requested_by onchange="menu_goto(this.form)">
<%
rstSearch2.Open strSQL2, Conn, adOpenKeyset, adLockOptimistic, adCmdText
do while not rstSearch2.EOF
%>
<option><%=rstsearch2.fields("LAST_NAME").value%></option>
<%rstSearch2.movenext
loop
rstSearch2.close
set rstSearch2 = nothing
response.flush
%>
<INPUT type="text" name=ctitle value="<%= Server.HTMLEncode(rstSearch3.Fields("ctitle").Value) %>" size="25">
LMK if you need any more information. Thanks in advance.