View Full Version : Slashdot menu problem

07-30-2007, 03:08 PM
1) Script Title: slashdot menu

2) Script URL (on DD):http://dynamicdrive.com/dynamicindex1/slashdot.htm

3) Describe problem: I don't want every block to be able to expand I just want it to be a link itself I can't get rid of the expand.gif and collapsed.gif. hopefully you all will understand what I explaining here.

08-06-2007, 12:34 PM
Please take a look at the following discussion and the link in my signature:

You will find this version will provide top level menu item to be a link without submenu content. I expect to add some changes shortly that will allow such direct links to be identified by different (or no) collapse/expand image.


12-11-2007, 05:36 PM
Hi Ictinus, thanks a lot for your work with SDmenu. I have a simple question with no answer cause im so bad writing code. I open the page with the menu (index page) and all rules ok. But when all the items are collapsed, how can I open that index page showed before? I want to make it Automatically, when all is collapsed. This happens when user "plays" with menu and cant remember where is

12-11-2007, 09:05 PM
If you are using SDNMenu (http://www.ictinus.com/sdnmenu/), then you can set the 'default states' to the state you want when the user refreshes the page (make sure to set 'remember' to false).... or you could confiure a menu item or another link on the page to 'reset' the menu to the state you want. Look at the 'Configuration' -> 'Restore Defaults Now' menu item in the demo page to see how.

Sorry not much detail provided here, not much time... my first child was born 4 days ago!

12-19-2007, 07:35 PM
I really appreciate the work you put into the SDNMENU. I recently came across it and I am trying to integrate it into a website of mine.

The problem that I am having relates the way that the cookies store the toplevel value that was last opened. Here is the scenario:

Menu has 3 top levels: ITEM A, ITEM B, ITEM C. Each has subcats.
1) a user clicks a top menu item, ITEM A, opening up the submenu categories.
2) user then clicks a submenu category under ITEM A. He is then taken to the subcategory page of ITEM A.
3) Now the user is on the subitem page of main category ITEM A. The cookie that is cached remembers that the last menu item opened was ITEM A.Therefore, the SDNMENU shows all toplevel items closed except for ITEM A.


4) Here is the problem. Now the SDNmenu shows the correct TOP level menu item open, BUT when I open other Top level items(ITEMS B & C), ITEM A remains open. Please keep in mind that I set this.define("collapse_lastmenu", true). I want the menu to only open on main cat. item at a time. But the cookie somehow forces ITEM A to stay open, overriding this.define("collapse_lastmenu", true).

Can you please help me find a way to somehow erase the cookie or close ITEM A when clicking on other Main cat items(ITEMS B OR C)?

I hate to interrupt this time with you and your family. Congratulations on the birth of your child.


12-19-2007, 07:37 PM
Ictinus! thanks a lot again for your precious time (to change diapers its not so easy...).
Here´s another doubt:

SDMenu uses window.onload = function() and if i have the focus on a field in a form
<body onLoad="window.myform.User.focus()"> so...the menu doesnt work. Can make it without window.onload?

Best regards

12-20-2007, 11:49 PM
Hi Albert,
I think the problem is that the 'last menu' is not stored in the cookie. So when you load a new page (from submenu item link), even though the menu state is restored from the cookie, there is no 'last menu'.
At the moment I'm expecting you have the menu structure defined in each 'page'. If so then you can get around the problem by setting 'remember' to false. and specifying the default state you require for each page.
Then when you follow a link to that page from anywhere (including the menu itself) the menu will open the correct state.

Chicatoy... are you using SDMenu or SDNMenu?

Albert: thinking about your issue a little more, I don't think my solution will work. I think the only solution is to store a cookie for 'last menu' and restore it within the init function. I'm looking to update SDNMenu with some improvements I made a while ago, but didn't finish. I'll think about including a 'last menu' cookie.