PDA

View Full Version : Problem Using Slashdot Menu.. when refreshing...



b007
04-23-2009, 05:45 PM
1) Script Title:
Slashdot Menu

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

3) Describe problem:

Hi,
When startup page or refreshing the menu start with all submenu expanded, and then it closed.
how to start it when it all closed?

What should I do?
Thanks.

b007
04-23-2009, 08:52 PM
Plz help me,
if ur not understanding something, ask me.

Thanks...

Snookerman
04-23-2009, 08:56 PM
I myself don't really understand. Could you please try to explain again?

b007
04-24-2009, 12:20 AM
Sure,
When I'm loading a page with the menu in it,
all the MenuItems that Got submenus Items are shown open.
and than closed by itselft.

I want that it from the beginning [when loading page..] will be closed.

unstarstand?

Snookerman
04-24-2009, 05:52 AM
Find the following in your code and change it from true to false:

myMenu.remember = true; // Store menu states (expanded or collapsed) in cookie and restore later

Good luck!

b007
04-24-2009, 08:20 AM
Still not working...
Can I send u my code?
if so... where?

b007
04-27-2009, 08:35 PM
1) Script Title:
Slashdot Menu

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

3) Describe problem:

Hi,
when pressing on one of the submenus in the menu, all of the submanuses are being expanded for second and after that collapsed.

how to start it when it all closed, meaning when I'll press on submenu it will not expands all submenus.

in the js i got this definition:


function SDMenu(id) {
if (!document.getElementById || !document.getElementsByTagName)
return false;
this.menu = document.getElementById(id);
this.submenus = this.menu.getElementsByTagName("div");
this.remember = false;
this.speed = 5;
this.markCurrent = true;
this.oneSmOnly = true;
}

What should I do?
Thanks...

Thanks.

b007
04-29-2009, 05:03 PM
Plz help me to fix it,
if u're not undersanding my problem plz ask.

Thanks..

Snookerman
04-29-2009, 05:41 PM
I think that happens because the code that closes the menus is being read after the page loads. I'm not sure if this will help, but since nobody has answered, try adding this to the head section of your page:

<script type="text/javascript">
myMenu.collapseAll();
</script>

Also, as you can see, I merged your threads since they deal with the same issue.

Good luck!