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

forms, links and databases.

Status
Not open for further replies.

Manic

Programmer
Feb 28, 2001
343
GB
Here is what I would like to do.

I have data populating a table and I would like to use some of the output as a link to my search section.

I currently use a form from another page to search but I would like to be able to use a link.

For the actual search page I use the following code.

If Request.Form("TypeSearch") = "Branch" Then
strSQL = strSQL & " WHERE Branch LIKE '%" & Request.Form("Box") & "%'"
End If



Manic
-----------------------------
I've broken it again !!
-----------------------------
 
If I'm understanding correctly you would want the link to point to your search page? Can you provide the code on your data table?

Wow JT that almost looked like you knew what you were doing!
 
This is the line from the data table.
Code:
Response.Write "<td valign='top'>" & rsPC("Branch")
I would like rsPC("Branch") as a text link to the search page

This is what I use in the normal search
Code:
<form action="search.asp" method="post" name="Form">
<select name="TypeSearch" size="1">
<option value="Branch">Branch</option>
<option value="OS">Operating System</option>
<option value="Replace">Needs replacing</option>
<option value="HDD">Hdd Size</option>
<option value="M_Type">Machine Type</option>
</select>

Thanks for your help
If you need any more info please let me kno
<input type="text" size="30" name="Box">
<input type="submit" name="B1" value="Search">
</form>

Manic
-----------------------------
I've broken it again !!
-----------------------------
 
OK... so add the href to your response.write.

Example:
Code:
response.write "<td valign='top'><a href="& <%=myVariable%> &">"& rsPC("Branch") &"</a>"

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top