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!

evaluating the value of a link

Status
Not open for further replies.

ecintern

Programmer
Feb 23, 2001
7
CA
I am having trouble evaluating the value of a link once it is selected. I have a web page where the user enters search criteria into a form. A search is then performed based on the criteria entered. A table is returned listing ref ID, author, and title. The ref ID's appear as links. If the user wishes to see the full listing for a record they click on the appropriate ref ID. This sends it to a new page displaying the full record for the ref ID they clicked on. I do not know how to evaluate which ref ID the user selected, so I am unable to return the appropriate full record display.

Any help would be appreciated.

Thanks
ecintern
 
Is this what you need?

On display page..

<cfoutput query=&quot;results&quot;>
.....
<a href=&quot;detail.cfm?refID=#urlencodedformat(results.refID)#&quot;>View Detail</a>
.......
</cfoutput>


On detail page...

<cfquery name=&quot;details&quot; datasource=&quot;myDs&quot;>
select * from tableName where refID = #refID#
</cfquery>

You can use #refID# or #url.refID# to refer to the variable. You would only need to use the &quot;url.&quot; reference if there was a variable named the same from another query or other scope. Also, if refID is a text field and not a numeric, change the &quot;= #refID#&quot; to &quot;= '#refid#'&quot;.

Hope this helps,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top