navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

I'm Almost There - Passing ID field

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> I'm Almost There - Passing ID field
Page: [1]
 
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
I'm Almost There - Passing ID field - 10/8/2003 14:54:26   
Hi,

Here are my pages:

1. http://www.hoopsking.com/browse_coaches3.asp
2. http://www.hoopsking.com/browse_coaches_display3.asp

Right now when you click a name, you will get the entire list of books and videos available. I only want the books and videos from that particular coach. I am passing the Coaches ID in the link. Here is my link from the last names:

browse_coaches_display3.asp?CoachID=<%=FP_FieldURL(fp_rs,"CoachID")%>

Here is my Custom Query statement on browse_coaches_display3.asp:

SELECT [Catalog Quick Find].ItemNumber, [Catalog Quick Find].ItemName, [Catalog Quick Find].URL
FROM Author INNER JOIN [Catalog Quick Find] ON Author.CoachID = [Catalog Quick Find].Author
WHERE (((Author.CoachID)=[CoachID]));

Once a coaches books and videos are displayed, a user should be able to click and be taken to that book or videos page.

Here is the link I have to do that:

<%=FP_FieldLink(fp_rs,"URL")%>

I think I'm almost there and need a push to the top!
Spooky

 

Posts: 26603
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/8/2003 17:32:18   
SELECT [Catalog Quick Find].ItemNumber, [Catalog Quick Find].ItemName, [Catalog Quick Find].URL
FROM Author INNER JOIN [Catalog Quick Find] ON Author.CoachID = [Catalog Quick Find].Author
WHERE (((Author.CoachID)=::CoachID::));

Using the DRW, you need to add CoachID as an input

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to hoopsking)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/8/2003 23:01:00   
How do I do that? Since I have a custom query on the display page I can't get to the input settings in the DRW. If I add it to the browse page there is an error.

(in reply to Spooky)
Spooky

 

Posts: 26603
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/8/2003 23:08:39   
"since I have a custom query" ?
How have you done that? If still using the DRW, the custom query can be modified at step 2 of the DRW

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to hoopsking)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/8/2003 23:55:16   
Yes, I created the custom query at Step 2 and can modify it there but have no idea how to make the Coach ID an input.

(in reply to Spooky)
Spooky

 

Posts: 26603
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/8/2003 23:57:03   
Just use the same code I posted

.... )=::CoachID::));

This makes it an input

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to hoopsking)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/9/2003 11:10:22   
Hi Spooky,

I pasted the code into the custom query box but now when I click on a name I get this error message:

Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver] Extra ) in query expression '(((Author.CoachID)=))'.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

One or more form fields were empty. You should provide default values for all form fields that are used in the query.

Any ideas?

(in reply to Spooky)
DarlingBri

 

Posts: 3123
From: Left of Centre, Cork, Ireland
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/9/2003 15:31:07   
Provide a default value of 1 in the DRW.

Step 3 > More Options > Defaults


Also, your link from browse_coaches3.asp is wrong. You're linking to browse_coaches_display3.asp?=<%=FP_FieldURL(fp_rs,"CoachID")%> and you need to instead link to:

browse_coaches_display3.asp?CoachID=<%=FP_FieldURL(fp_rs,"CoachID")%>

or possibly browse_coaches_display3.asp?ID=<%=FP_FieldURL(fp_rs,"CoachID")%>

(in reply to hoopsking)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/9/2003 16:06:47   
The hyperlink fixed it and it now works. Thank you so much.

My next step is to get the displayed results to hyperlink to the exact product page. For example, I click on John Scott but the hyperlinks for his videos arent' correct. It displays the title of the video instead of the URL.

I've have other hyperlinks on my site through the database but can't figure this one out.

(in reply to DarlingBri)
DarlingBri

 

Posts: 3123
From: Left of Centre, Cork, Ireland
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/9/2003 17:56:40   
Again, with the hyperlink parameters:

http://www.hoopsking.com/browse_coaches_display3.asp?CoachID=91

5 Star Shooting Method needs to hyperlink to <%=FP_FieldURL(fp_rs,"YourURLFieldName")%>

(in reply to hoopsking)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/9/2003 22:30:57   
I did have that for the most part. I did change FieldLink to FieldURL and I copied and pasted what you posted but it still just displays the item title.

When I orginally did the hyperlink, I went to hyperlinks, parameters, and inserted the URL paramter.

(in reply to DarlingBri)
DarlingBri

 

Posts: 3123
From: Left of Centre, Cork, Ireland
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/10/2003 5:31:59   
What is the name of the field that holds the URLs?

(in reply to hoopsking)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/10/2003 9:30:57   
The name field is "URL".

(in reply to DarlingBri)
Spooky

 

Posts: 26603
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/10/2003 15:32:47   
Currently you display 2 columns
Item number, item name.

Item name is a hyperlink.

What is the code you have used for that?

It may change from :
<a href="<%=FP_FieldURL(fp_rs,"URL")%>"><%=FP_Field(fp_rs,"ItemName")%></a>

to
<a href="<%=FP_FieldURL(fp_rs,"ItemName")%>"><%=FP_Field(fp_rs,"ItemName")%></a>

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to hoopsking)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/10/2003 16:05:01   
Here is the code I used.

<%=FP_FieldLink(fp_rs,"URL")%>

I tried your links without success.

(in reply to Spooky)
Spooky

 

Posts: 26603
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/10/2003 16:23:43   
You wish to link to a URL that is associated with the record?
What happens when you replace your code with :

<a href="<%=FP_FieldURL(fp_rs,"URL")%>"><%=FP_Field(fp_rs,"URL")%></a>

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to hoopsking)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/10/2003 16:56:02   
That didn't work either.

Yes, I have an item name and the URL that goes with it in the table. I could display the URL if I wished but just want to link to it.

Here is the code around the hyperlink:

<!--webbot bot="DatabaseRegionStart" endspan i-CheckSum="50115" --><tr>
<td>

<!--webbot bot="DatabaseResultColumn" s-columnnames="ItemNumber,ItemName,URL" s-column="ItemNumber" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>ItemNumber<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"ItemNumber")%><!--webbot bot="DatabaseResultColumn" endspan i-CheckSum="30924" --></td>
<td>

<a href="<%=FP_FieldURL(fp_rs,"URL")%>"><%=FP_Field(fp_rs,"URL")%></a>
<!--webbot bot="DatabaseResultColumn" s-columnnames="ItemNumber,ItemName,URL" s-column="ItemName" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>ItemName<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"ItemName")%><!--webbot bot="DatabaseResultColumn" endspan i-CheckSum="16629" --></a></a></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr>" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-CheckSum="62730" --></tbody>
</table></body>

(in reply to Spooky)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/10/2003 16:58:14   
I've got it to work by changing the --><%=FP_FieldVal(fp_rs,"ItemName")%><!-- to "URL".

(in reply to hoopsking)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/10/2003 16:59:49   
How do I get rid of the 2 displays? Click this link and you'll see what I mean:

http://www.hoopsking.com/browse_coaches_display3.asp?CoachID=43

(in reply to hoopsking)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/10/2003 17:00:23   
Only the item name should be displayed and not the entire URL.

(in reply to hoopsking)
Spooky

 

Posts: 26603
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/10/2003 17:07:54   
Yep - now thats back to the first code :

<a href="<%=FP_FieldURL(fp_rs,"URL")%>"><%=FP_Field(fp_rs,"ItemName")%></a>

What part didnt work for that?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to hoopsking)
hoopsking

 

Posts: 165
Joined: 1/16/2002
From:
Status: offline

 
RE: I'm Almost There - Passing ID field - 10/10/2003 21:37:34   
I'm not sure. I got the extra code out of there and now everything is working just fine. Thanks for your help.

Putting the links into the hyperlink properties window just wouldn't do it. I had to mess with the code.

(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> I'm Almost There - Passing ID field
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts