Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 8th, 2003, 09:19 AM
Authorized User
 
Join Date: Nov 2003
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default hyperlink

Ive created a search option that allows a user to search for specific records, and have displayed the search results in a table. Each record has a unique number. How do i make this table, so that a user can click on the record number, and be displayed with further information stored about this record, Like a hyperlink

many thanks

 
Old December 8th, 2003, 01:44 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You need to write out a hyperlink tag with the record ID in the querystring of the URL and create a page that will show more detail:

<a href="recordDetail.asp?recordID=<%=recordset("reco rdIDField")%>">Click for more detail</a>

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old December 10th, 2003, 05:22 AM
Authorized User
 
Join Date: Nov 2003
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thank you

 
Old December 17th, 2003, 09:39 AM
Registered User
 
Join Date: Dec 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

im also trying to figure this out (yeah im new!), so what would the detail page look like. cos mine isnt working. i dont understand the WHERE bit i think.

here's my code for my hyperlinks:

Code:
<a href="filmsdetail.asp?MovieID=<%=objRS("MovieID")%>"><%=objRS("Title")%> (<%=objRS("Jaar")%>)</a><br>
and then i have my detail page looking like this:
(this part isnt working yet)

Code:
<%
DIM mySQL, objRS
mySQL = "SELECT * FROM Movies WHERE MovieID=" &MovieID& "" 
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.CursorType = 1
objRS.Open mySQL, objConn

%>

<P><%=objRS("Title")%> (<%=objRS("Jaar")%>)<br><br>
can anyone advise?

 
Old December 17th, 2003, 10:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

You want to pull the movieID out of the URL QueryString.

You need to add this: Request.QueryString("MovieID")

Dim myNewVariable
myNewVariable = Request.QueryString("MovieID")
'Response.write(myNewVariable) ' for testing

<%
DIM mySQL, objRS
mySQL = "SELECT * FROM Movies WHERE MovieID=" & myNewVariable & ""
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.CursorType = 1
objRS.Open mySQL, objConn

%>
 
Old December 17th, 2003, 10:33 AM
Registered User
 
Join Date: Dec 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanx. its working!!
brilliant :D






Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink sryap3 Access VBA 1 November 20th, 2008 04:25 PM
How we can use hyperlink nagham Crystal Reports 0 February 9th, 2007 03:51 AM
hyperlink kritimehrotra Excel VBA 3 July 24th, 2006 08:32 PM
hyperlink hyperlink sbhandar Classic ASP Basics 6 August 26th, 2004 02:04 AM
Hyperlink viktor26 Classic ASP Basics 0 October 19th, 2003 09:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.