PDA

View Full Version : Problem with menu SOS help me...



b007
05-03-2009, 10:26 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.\

and it still also when I added this myMenu.collapseAll();
here:

<script type="text/javascript">
// <![CDATA[
var myMenu;
window.onload = function() {
myMenu = new SDMenu("my_menu");
myMenu.collapseAll();
myMenu.init();

};
// ]]>
</script>

Also, want when I open a menuitem which got a submebuitems and perss on one item in it, the menuitem with this submebuitems will stay open where I pressed before?

(this is set to true: this.remember = true;)

it close when the link of it open.
How to fix it?
Thanks..

Nile
05-03-2009, 10:35 PM
I don't understand you're problem at all.
Try this (http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu.htm) script.
Please post a link to the page on your site that contains the problematic script so we can check it out.
Please include your code so that we can take a look at it, we can't do much without it. When you do post your code remember to use [code] tags. That includes [ html ], [ code ], and [ php ].

b007
05-03-2009, 10:45 PM
I still want ti use Slashdot Menu.

My problem is when I click on a submenu-Item on a menu-item

it open me the link but the menu return to his regular view [all menus-item are closed]

How to make it remain open on the Submenu-item I just click,
until I click on another menu item.

Understand it?
Thanks..

Nile
05-03-2009, 10:46 PM
Yes, I do understand. But before I continue helping you, you must do the following.
Please post a link to the page on your site that contains the problematic script so we can check it out.
Please include your code so that we can take a look at it, we can't do much without it. When you do post your code remember to use [code] tags. That includes [ html ], [ code ], and [ php ].

b007
05-03-2009, 11:26 PM
It's not publish yet,
here is the code of it:
in the js file:


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

in the MasterPage code:


<link rel="stylesheet" type="text/css" href="sdmenu/sdmenu.css" />
<script type="text/javascript" src="sdmenu/sdmenu.js">
</script>
<script type="text/javascript">
// <![CDATA[
var myMenu;
window.onload = function() {
myMenu = new SDMenu("my_menu");
myMenu.collapseAll();
myMenu.init();

};
// ]]>
</script>

and the Menu code:


<div style="float:right" id="my_menu" class="sdmenu">
<div onclick="JavaScript:eventualRedirect(redirectTo='default.aspx',0)">
<span>Home Page</span>
</div>
<div onclick="JavaScript:eventualRedirect(redirectTo='register.aspx',0)">
<span>Register To System</span>
</div>
<div>
<span>Menu</span>
<a href="1.aspx">SubMenu1</a>
<a href="2.aspx">SubMenu2</a>
<a href="3.aspx">SubMenu3</a>
<a href="4.aspx">SubMenu4</a>
</div>
</div>


That's it,
What I'm doing wrong?
Thanks..

Nile
05-04-2009, 04:14 PM
Hmm, it appears this is a bug(I tried, and had the same problem). Try posting this in the bug section (sorry to get you posting a lot..)

Snookerman
05-04-2009, 04:25 PM
Don't worry about it Gil, I'll move this thread for you :)

Nile
05-04-2009, 04:29 PM
I also forgot to mention that bug reports are difficult when it's by a member, who hasn't visited for about 2 months. DimX (http://www.dynamicdrive.com/forums/member.php?u=10544) is the creator of this script, try contacting him.

b007
05-04-2009, 04:51 PM
Plz help me to fix it.
Thanks...