Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this modification going to be easy or hard?
Message
General information
Forum:
Internet
Category:
Active Server Page
Miscellaneous
Thread ID:
01007738
Message ID:
01007795
Views:
9
Steve,

Check out my link page at

http://www.GLRsoftware.com/Links.asp

and, click the Show Tree button.

At the end of the page is a link to some sample code to do the tree.

>Here's the Home Page I want to modify
>http://www.FansGoWild.com/fansgowild2/default2.asp
>
>I don't know if I am allowed to embed a URL in my question?
>
>If you visit that link you will see the list of catalog/subcatalog links is a mile long.
>
>Here's how I want to change it.
>
>Make each catalog (7 total) a MouseOver so the subcatalog (up to 113 total, but varies depending upon catalog) only appears on MouseOver of the catalog name. In other words, I wanna make the list as short as the longest subcatalog link list within a single catalog on catalog MouseOver.
>
>The code that follows is the displaycatalog.asp page the spits out that mile long list on the Home Page. I just wondered if it was a big deal to make that change to this code or not. Thanks for the advice. I really appreciate it. I am a little wet behind the ears on some of this stuff yet.
>
>
><%
>
>
>
>'create recordset to show database categories and subcategories
>Dim subcatRS, RS, rsCatalog, subcatSQL, SQL, priorCatalog, curCatalog, catalogID, catalogName, subcatalogName, subcatalogID
>
>Set Conn = Server.CreateObject("ADODB.Connection")
>Conn.Open ConString
>
>'check to see if there are any subcatalogs
>subcatSQL = "SELECT * FROM subCatalogs ORDER BY subcatalogID ASC"
>Set subcatRS = Conn.Execute( subcatSQL )
>
>If subcatRS.BOF or subcatRS.EOF then
>
>        Set subcatRS = Nothing
>        'if there are no subcatalogs create recordset to show categories only
>        Set rsCatalog = Conn.Execute("SELECT * FROM catalogs ORDER BY catalogID ASC")
>                While Not rsCatalog.EOF
>  
>
>        <li><font face="Arial" size="4"><b>
>        <a href="productsByCategory.asp?intCatalogID=<%                        Response.Write rsCatalog("catalogID")   &strCatalog_NAME=<%                        Response.Write Server.URLEncode(rsCatalog("catalogName"))  ">
>        <%= rsCatalog("catalogName")   </a></b></font></li>
>
><%
>        rsCatalog.MoveNext
>        Wend
>        rsCatalog.Close
>        Set rsCatalog = Nothing
>
>else ' if there are subcatalogs, create recordset to show categories and subcategories (NOTE: you will need a subcategory to display a category)
>
>        SQL = "SELECT * FROM catalogs,subcatalogs " _
>        & "WHERE subcatalogs.catalogID = catalogs.catalogID " _
>        & "ORDER BY catalogs.catalogName, subcatalogs.subcatalogName"
>
>Set RS = Conn.Execute( SQL )
>
>priorCatalog = ""
>
>Do Until RS.EOF
>
>   curCatalog = RS("catalogName")
>   catalogID = RS("catalogs.catalogID")
>   catalogName = RS("catalogName")
>   subcatalogName = RS("subcatalogName")
>   subcatalogID = RS("subcatalogID")
>
>    If curCatalog <> priorCatalog Then
>       If priorCatalog <> "" Then
>           Response.Write "</ul>"
>       End If
>       Response.Write "<font face='Arial' size='4'><b><a href='productsByCategory.asp?intCatalogID="
>       Response.Write catalogID & "&strCatalog_NAME="
>       Response.Write Server.URLEncode(catalogName) & "'>"
>       Response.Write curCatalog & "</a></b></font><ul>"
>       priorCatalog = curCatalog
>   End If
>
>   Response.Write "<font face='Arial' size='1'><b><a href='productsByCategory.asp?strSubCatalogID="
>   Response.Write subcatalogID & "&curCatalogID="
>   Response.Write catalogID & "&strSubCatalog_NAME="
>   Response.Write Server.URLEncode(subcatalogName) & "'>"
>   Response.Write subcatalogName & "</a></b></font><br>"
>   RS.MoveNext
>
>Loop
>Response.Write "</ul>" ' clean up the tags!
>
>RS.Close
>Set RS = Nothing
>End If
>          
>
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform