Forums

ASP

This topic is locked

menu problem

Posted 30 Mar 2006 20:40:45
1
has voted
30 Mar 2006 20:40:45 Javier Castro posted:
Hi all,

currently, I'm working on a dynamic website that has one main menu on the left and a secondary horizontal menu that appears on the right when an item of the main menu is clicked on.
Below the secondary menu and at the right of the main menu, it is the body where all my records from the second menu should be displayed. So far, I have managed to have the main menu ad the secondary menu work to display the records properly. My problem is the following: the submenu keeps disapearing when I click on it. I don't know why this keeps on happening. I have tried using BINDINGS and creating A Variable to keep the secondary menu, but it doesn't work and it takes my url out.

I'm using Classic ASP, DWMX 2004, MS Access and windows

Please help. Any ideas, really, any ideas that can help to find a solution are very much appreciated. Perhaps another approach??? anything.

the second menu code is:

<%
Dim rsSubCats__MMColParam
rsSubCats__MMColParam = "True"
If (Request("MM_EmptyValue" <> "" Then
rsSubCats__MMColParam = Request("MM_EmptyValue"
End If
%>
<%
Dim rsSubCats__MMColParam1
rsSubCats__MMColParam1 = "0"
If (Request.QueryString("cat" <> "" Then
rsSubCats__MMColParam1 = Request.QueryString("cat"
End If
%>
<%
Dim rsSubCats
Dim rsSubCats_numRows

Set rsSubCats = Server.CreateObject("ADODB.Recordset"
rsSubCats.ActiveConnection = MM_connProducts_STRING
rsSubCats.Source = "SELECT tblProdSubcat.bitShow, intPCatID, intPSubCatID, txtSubCatName, intProdCatID FROM tblProdSubcat, tblProdCat WHERE tblProdSubcat.bitShow = " + Replace(rsSubCats__MMColParam, "'", "''" + " AND intPCatID = intProdCatID AND intPCatID LIKE '" + Replace(rsSubCats__MMColParam1, "'", "''" + "' ORDER BY intPSubCatID ASC"
rsSubCats.CursorType = 0
rsSubCats.CursorLocation = 2
rsSubCats.LockType = 1
rsSubCats.Open()

rsSubCats_numRows = 0
%>
<div id="navsubcat">
<div align="right">
<%
While ((Repeat2__numRows <> 0) AND (NOT rsSubCats.EOF))
%>
<a href="server/url/home.asp?subcat=<%=(rsSubCats.Fields.Item("intPSubCatID".Value)%>"><%=(rsSubCats.Fields.Item("txtSubCatName".Value)%></a>
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
rsSubCats.MoveNext()
Wend
%>
</div>

</div>

<%
rsSubCats.Close()
Set rsSubCats = Nothing
%>

Replies

Replied 31 Mar 2006 18:04:16
31 Mar 2006 18:04:16 Simon Bloodworth replied:
when the Submenu is clicked it will loose its association with the main menu. I think you might need to keep the most recent menu selection in maybe a session or a temp database and then have the sub menu to be set to equal the session or something

hope this helps

Simon

DWMX 2004 | ASP | VBScript

Reply to this topic