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

Clickable Fields in Database Results Page

Status
Not open for further replies.

OBarry

Programmer
Nov 14, 2000
16
US
Hi All,

I'm hoping someone will be able to help me with this. I am using Frontpage 2000 and an Access 97 database. What I've done so far is create a search page (asp) to query the database (by author, title, etc) and this works great. What I need to do now is on the results page I need to make a couple of the fields "clickable" to either open an image file or show more information about the whole record.

Hope this makes sense and thanks for any help in advance.

_____________________________________________________
A good friend will come and bail you out of jail ...
but a true friend will be sitting next to you saying,
"Damn, that was fun!!"
 
OK, let's say you want to make the Title of each result a link to another page that displays information about the title. And I'm going to assume that each record in the database has its own unique ID number.

In your results pages, you'll need to make the title into a link by inserting some code like this:

Response.Write &quot;<a href=&quot;&quot;details.asp?record=&quot; & objRS(&quot;id&quot;) & &quot;&quot;&quot;>&quot; & &quot;Title&quot; & &quot;</a>&quot;

The above code inserts the ID number of the title's record into a query string. You will then need a page to display that record, and you'll use a Select statement to grab that particular record, like this:

intID = Request.QueryString(&quot;record&quot;)
&quot;Select id, title, author FROM mytable WHERE mytable.id =&quot; & intID & &quot;&quot;

That should do it.

=========================
rollout
=========================
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top