Print Page | Close Window

Suggesting for more efficent displaying

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=14624
Printed Date: 30 March 2026 at 6:38am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Suggesting for more efficent displaying
Posted By: thefrost
Subject: Suggesting for more efficent displaying
Date Posted: 09 April 2005 at 8:22am
The way i have my site set up is that the navigation is in 2 different tables. One table has the main links and the other has the sub links. For example if you check http://pchoops.sky-world.net//pchoops-com/lite.asp?cid=SWPQ9SDTT07ZJI9KR4POI0X i have where it says links then when you go over it it has the sub links displaying.
 
 
Here is the code i have for displaying the navigation:
 ( I DIDNt USE THE CODE TAGS because for some reason it just went straight accross the screen horizontal Confused

<%
dim DBPATH, DBCON, DBRS, DBSQL
dim db_PATH, db_CON, db_RS, db_SQL
DBPATH = "D:\Inetpub\wwwroot\Sky-WorldForum\pchoops-com\database\navigation.mdb"
'--------------------------------------------------------------
 Set DBCON = Server.CreateObject("ADODB.CONnection")
 DBCON.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & DBPATH
 Set DBRS = Server.CreateObject("ADODB.Recordset")
 DBSQL = "select * from config order by menu_name asc"
 DBRS.CuRSorType = 2
 DBRS.LockType = 3
 DBRS.Open DBSQL, DBCON
while not dbrs.eof
%>
<!--START CUSTOM NAVIGATION (DO NOT MODIFY THIS) [ http://pchoops.sky-world.net - http://pchoops.sky-world.net ]-->
<%
'menu_id = 33 characters
MENU_ID = dbrs("menu_id")
MENU_TITLE = dbrs("menu_name")
%>
<div class="mnpMenuRow" style="BORDER-LEFT-COLOR: #999999; BACKGROUND: white; OVERFLOW-X: hidden; BORDER-BOTTOM-COLOR: #999999; WIDTH: 176px; CURSOR: default; BORDER-TOP-COLOR: #999999; BORDER-RIGHT-COLOR: #999999" menu="<%=MENU_ID%>">
<img class="mnpMenuArrow" title style="LEFT: 166px; VISIBILITY: hidden" height="7" alt="*" src=" http://pchoops.sky-world.net/pchoops-com/images/arrowLTR.gif - http://pchoops.sky-world.net/pchoops-com/images/arrowLTR.gif " width="4" border="0">
<%=MENU_TITLE%></div>
<!--END CUSTOM NAVIGATION [ http://pchoops.sky-world.net - http://pchoops.sky-world.net ]-->
<%
db_PATH = "D:\Inetpub\wwwroot\Sky-WorldForum\pchoops-com\database\navigation.mdb"
'--------------------------------------------------------------
 Set db_CON = Server.CreateObject("ADOdb.CONnection")
 db_CON.Open "DRIVER={Microsoft Access Driver (*.mdb)}; dbQ=" & db_PATH
 Set db_RS = Server.CreateObject("ADOdb.Recordset")
 db_SQL = "select * from navigation where menu_id='" & menu_id & "' order by id desc"
 db_RS.CuRSorType = 2
 db_RS.LockType = 3
 db_RS.Open db_SQL, db_CON
%>

<!--START SUB MENU NAVIGATION [ http://pchoops.sky-world.net - http://pchoops.sky-world.net ]-->
<%
startsubmenu(menu_id)
while not db_RS.eof
submenu db_RS("title"), domain & script_name & "?cid=" & db_RS("cid")
db_RS.movenext
wend
endsubmenu()

%><!--END SUB MENU NAVIGATION [ http://pchoops.sky-world.net - http://pchoops.sky-world.net ]-->
<%
dbRS.movenext
wend
%>

 
 
All help is greatly appreciated, Right now what i have up there does work but i think that in the end it may end up crashing because it is not efficiently coded the way i think it probally should be.
 
-The Frost



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net