Expanding tree menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
paulv
Beginner
Beginner
Posts: 3
Joined: Tue Jan 15, 2008 11:25 am

Expanding tree menu

Post by paulv »

We are trying out your expanding tree menu which I understand is not acutally fully released at the moment.

Most of it appears to work but we do have an issue with menus not opening.

We have some test pages at

http://www.wiltscoll.ac.uk/external/test/

Using Internet Explorer 7 Click on 'Test menu'. It expands. Click on say 'Test 3' which takes you to a new page keeping the menu open as expected.
Click on 'Student Services' it expands. Then click on 'Test Menu' but it does not close 'Student Services' menu and the 'Test Menu' does not expand. If you then click on a menu above it like 'Course information' that expands correctly but menus below do not expand.

Is this to do with some menu items having trees items but other menu items not have tree items.

Paul
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Expanding tree menu

Post by Ruth »

Hi,

Unfortunately, I do not have IE 7 and John doesn't seem to be on today. I'll try to email and get him to check it.

One thing, I am not getting the open menu when I go to that page having clicked the test 3 item. The reason is you are using openmenusbyurl.js which is not really for collapse menus. I don't know which menu is supposed to be open, if it is the test menu one then you would code this on the page where you want it to open. Most put it the last thing before the closing body tag. As I can't see the problem I'm not sure if this will fix it or not.

<script type="text/javascript">
openBranchByName("test7");
</script>

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Expanding tree menu

Post by John »

I followed exactly the steps you outlined and did not see any of the failures you described. Have you made any site changes since your last post?
John
paulv
Beginner
Beginner
Posts: 3
Joined: Tue Jan 15, 2008 11:25 am

Re: Expanding tree menu

Post by paulv »

It looks like the problem was the openmenusbyurl.js and after removing it the Javascript error stopped.

Adding the following to open the menu works correctly on a blank page http://www.wiltscoll.ac.uk/external/test/index.htm

<script type="text/javascript">
openBranchByName("menu7");
</script>

but I am having problems with placing the menu onto our other pages in that the sub menu is offset on all browsers as shown on http://www.wiltscoll.ac.uk/external/test/default.asp.

Putting buildAfterLoad=true into the collapse_data.js file sorts out the offset, but then the pages do not automatically open the sub menu branch.

Have I placed the javascript include files in the correct place on the page ?

Paul
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Expanding tree menu

Post by John »

While the calls should work in either the head or body, I have found that placing them as the first item after the body tag seems to work better.

Also, you can use the 'new' formatting calls, and, if you're not supporting NS4 (who is?), you can leave that one out...

Code: Select all

<script type="text/javascript" src="milonic_src.js"></script>
<noscript><a href="https://milonic.com/">JavaScript DHTML Menu Powered by Milonic</a></noscript>
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="menu_data.js"></script>
etc.
John
paulv
Beginner
Beginner
Posts: 3
Joined: Tue Jan 15, 2008 11:25 am

Re: Expanding tree menu

Post by paulv »

We have still not been able to stop the sub menu offsetting as shown on

http://www.wiltscoll.ac.uk/external/test/default.asp

This happens on all browsers with all submenus.

Is there a way to off setting the sub menus other than using top="offset=-20" which we have tried and which dosn't seem to help.

Paul
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Expanding tree menu

Post by Ruth »

Hi,

It is from the css, and I have no idea how to fix it. I don't do much css design. Anyway, the problem is resulting from these

Code: Select all

#main {
	PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: auto; WIDTH: 960px; MARGIN-RIGHT: auto; PADDING-TOP: 0px; POSITION: relative; TEXT-ALIGN: left
}
#content {
	BORDER:1px solid red;PADDING-RIGHT: 0px; PADDING-LEFT: 0px; LEFT: 480px; PADDING-BOTTOM: 0px; MARGIN-LEFT: -480px; WIDTH: 960px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px; POSITION: absolute; TEXT-ALIGN: left
}
The issue is corrected with this css

Code: Select all

#main {
	PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN-LEFT: auto; WIDTH: 960px; MARGIN-RIGHT: auto; PADDING-TOP: 0px; TEXT-ALIGN: left;
}
#content {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; WIDTH: 960px; MARGIN-RIGHT: 0px; PADDING-TOP: 0px; TEXT-ALIGN: left
}
And with that, column2 needs to be sized at 510px.

I'm not saying to use this, only that the problem is in the position:relative;position:absolute and the left and margin-left - number in the #content.

This seems to cause no problem in how it looks at 1024x768 in FF, NN7 and 9, Safari3 for pc. But, as usual IE is a problem, it shifts all the way left, but none of the other browsers do that. Can't test on Mac though.

Hope this helps. Maybe since you do css you would know how to set something up.

Ruth
Post Reply