Hello All,
I’m struggling to find a way to pass data from one page to another.
The code to my input form is below. This works fine.
Code:
<script type="text/javascript">
function GoToForm2()
{
parent.location = 'Form2.asp'
}
</script>
<Form action="Form1.asp" method="get">
<p>
<input type="text" name="tbxSearch" id="tbxSearch" value=""/>
<input type="submit" name="btnSubmit" id="btnSubmit" value="Search" />
<br />
<%
if request.querystring("btnSubmit") = "Search" then
strSearch = request.querystring("tbxSearch")
%>
<SELECT name="UserName" onchange="GoToForm2()";>
<%
'open DB
set conn=createobject("ADODB.Connection")
conn.ConnectionString = "DSN=Server1;Uid=user1;Pwd=password1"
conn.open
'retrieve dropdown menu contents
sql = "SELECT table1.last_name, " &_
"table1.first_name, " &_
"table1.unique_id, " &_
"FROM table1 " &_
"WHERE table1.last_name LIKE '%" & strSearch & "%'"
set rs = conn.execute(sql)
'populate dropdown
While Not rs.EOF
strLName = rs("last_name")
strFName = rs("first_name")
strUID = rs("unique_id")
response.write "<OPTION>" & strLName + ", " + strFName + ", " + strUID & "</OPTION>"
rs.MoveNext
Wend
rs.close
Set rs = Nothing
%>
</SELECT>
<% end if %>
</form>
However, I need to pass three fields (‘last_name’, ‘first_name’, ‘unique_id’) to another page/form.
I’ve tried several variations on the code below but nothing has worked.
Code:
<INPUT <% Response.Write(Request.QueryString(“last_name")); %> >
Any help or suggestions with this would be GREATLY appreciated!
- tl