HELP: Looking for tutorial...

J

John

Hi all,
Can anyone point me in the direction of a simple tutorial on using MS
Access and ASP to create dynamic menu navigation?
TIA.
 
T

Thomas A. Rowe

Please describe what you mean by dynamic menu and how it would be related to using ASP/Access

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
C

clintonG

Google: "listbox"+"navigation"+"asp"+"database"

Whether you use a listbox or not the many documents that you will find with
that search term and its variants are where you can get started learning to
retrieve data from a database and reuse it in the user interface for
navigation.
 
J

John

What I mean is having the website pull its navigation links into the
page direct from an Access database, hopefully showing...
Main Menu
Sub menu
Sub sub menu

although perhaps not 3 levels deep.
Presumably, the database would possibly contain a table for the main
links, a related table for sub links, and if neccessary further tables
for further sub sub links.
 
T

Thomas A. Rowe

John,

I know of no tutorial or resource, but it is doable with ASP/VBScript and Access. The table do not
have to be related via Access, just have common code to associate the items.

i.e., the following is just a real quick example of setting up the database, there are other ways to
accomplish.

MainMenu Table
Fields:
ID = Autonumber
MenuID = 6 Character text field, ex: A10000
MenuTitle = 25 Character text field

SubMenu Table
Fields:
ID = Autonumber
MenuID = 6 Character text field: match content in MainMenu table, ex: A10000
SubMenuID = 6 Character text field, ex: A11000
SubMenuTitle = 25 Character text field

SubSubMenu Table
Fields:
ID = Autonumber
SubMenuID = 6 Character text field: match content in SubMenu table, ex: A11000
SubSubMenuID = 6 Character text field, ex: A11100
SubSubMenuTitle = 25 Character text field

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
B

Bob Lehmann

You don't need multiple tables. You could do something like this....

id
parent_id
menu_item

Then populate it like this.....

id parent_id menu_item
1 0 Main1
2 0 Main2
3 1 Main1_1
4 1 Main1_2
5 1 Main1_3
6 2 Main2_1
7 2 Main2_2
8 2 Main2_3
9 3 Main1_1_1

For example, in id=9 "1" is the Main Menu for Main1, "3" is a Sub Menu of
Main1 and "9" is a Sub Sub Menu of Main1.

The main benefit here is that you don't need to keep adding tables as you
add sub (n) menues.

Bob Lehmann
 
T

Thomas A. Rowe

True, your method is another option, but I find it easier in the long run to have separate table for
each level of menus/categories, etc.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
J

John

Thanks Thomas for your input.
I think on this occasion I'll try Bob's suggestion as its far easier
opening single tables in ASP than multiple tables.
 
J

John

Thanks Bob, I'll give it a go.

You don't need multiple tables. You could do something like this....

id
parent_id
menu_item

Then populate it like this.....

id parent_id menu_item
1 0 Main1
2 0 Main2
3 1 Main1_1
4 1 Main1_2
5 1 Main1_3
6 2 Main2_1
7 2 Main2_2
8 2 Main2_3
9 3 Main1_1_1

For example, in id=9 "1" is the Main Menu for Main1, "3" is a Sub Menu of
Main1 and "9" is a Sub Sub Menu of Main1.

The main benefit here is that you don't need to keep adding tables as you
add sub (n) menues.

Bob Lehmann
 
Top