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

Dynamic links to populate products Page?

Status
Not open for further replies.

txwaiting4u

Programmer
Jun 28, 2002
17
US
First of all, I'm using ASP, VBScript, and MS Access. My links (categories of products) on my website pages are dynamically created depending on the "active" products in my database based on their categories. Can anyone guide me in how to make these categories actual links that when clicked on will take my customers to the products page that is populated with all of the products from the database that are associated with that category?

For example:

product aaa has category 1, product bbb has category 1 and 2, product ccc has category 1, 2, and 3. These are all active products. The links on the left hand side of the page would be as follows:

1
2
3

When the customer clicks on 1, the products page comes up with products aaa, bbb, and ccc. When the customer clicks on 2, the products bbb and ccc appear. When the customer clicks on 3, the product ccc will appear. There will always be at least one product to be populated since the links are categories that have active products associated with them.

I would appreciate any assistance. Thanks!
 
do u need some more code-specific help or....?

look through :

Help--->Using Dreamweaver(F1)
[Index] tab
type: "detail pages"


:--------------------------------------------------------------------------:
fugitive.gif

ok,ok...I did shoot the deputy but he told me he was the sheriff!
:--------------------------------------------------------------------------:
 
Actually, just a high-level understanding of what I need to do is good.

All the links for the product categories will go to the products page. My question is how do I pass the parameter of the actual category to that page where I can check for that category in the database on the detail page and pull all valid products for that category to be displayed. Thanks!
 
pass a querystring to the page, then use that as a modifier for the database search;

link code

<a href="url?cat=123">widgets</a>

page code this is vbscript btw (assuming a sql db)
Code:
dim CatID
CatId = cint(request.querystring("cat"))

sql = "SELECT fieldlist FROM table WHERE cat_field = " & CatID & " ;"

'rest of page


Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
DW help file is not jsut about theory...it gives u SETP BY STEP how to set it up and comes with actuall code snips...
what problem ur having?
post some code
links are just links....and lead/submit to the deail pages where u filter your recordset by 'URL parameter'....don't know what to say but to post your code....
All the best!

:--------------------------------------------------------------------------:
fugitive.gif

ok,ok...I did shoot the deputy but he told me he was the sheriff!
:--------------------------------------------------------------------------:
 
nice!!!
All the best!

:--------------------------------------------------------------------------:
fugitive.gif

ok,ok...I did shoot the deputy but he told me he was the sheriff!
:--------------------------------------------------------------------------:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top