open a sub-menu and keep it open with asp/php

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
atypic
Beginner
Beginner
Posts: 2
Joined: Wed Aug 18, 2004 8:34 pm

open a sub-menu and keep it open with asp/php

Post by atypic »

ok, i've searched the mailing-list before posting this question. i think this question should be included in the FAQ:

let's say that i have this menu and sub-menu:

ABOUT US
mission - history

when hit mission.asp - i want to have the ABOUT US highlighted plus the sub-menu opened with mission highlighted.

we did this to have ABOUT US and mission highlighted (in ASP) :
in mission.asp:
<SCRIPT language=JavaScript src="asp/menu_data.asp?s=1&ss=3" type=text/javascript></SCRIPT>

in menu_data.asp
...
<% if (s = 1) then %>
aI("text=<b><font color='#FFFFFF'>jccm</font></b>;showmenu=JCCM;");
<% else %>
aI("text=<b>jccm</b>;showmenu=JCCM;");
<% end if %>
...

but i want to have the sub-menu ABOUT US opened when i'm on a section of ABOUT US. sorry for my engligh folks!!!

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

Post by Ruth »

http://milonic.com/forum/viewtopic. ... 9716#20190 This post has to do with making sure the submenus are opened on the pages to which they refer. So, let's say you had 4 sections on your site, 1,2,3,4 Using the functions provided here whenever you went to section 1 then the main menu would be there and the submenu which refers to section 1 would be open and visible, it would be that way on any page which comes off that section 1 submenu. The post is long and it involves javascript functions written specifically to do just what you are asking. The link should take you right to the beginning function post, if not it is the first post by Kevin on that first page of the topic. In that post there is also a 'test' you can download and peruse. This was written for a specific site layout but as far as I can see it would be applicable to any site.

As for the highlighting part I believe that would be from the pagebgcolor= whatever color you put to highlight and show that you're on a specific page. I hope this helps.

Ruth
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Re: open a sub-menu and keep it open with asp/php

Post by kevin3442 »

Hi Patrick,

You might also check out this post... a .js file you can add to your page that may automatically do what you want.
atypic wrote:ok, i've searched the mailing-list before posting this question. i think this question should be included in the FAQ:
I'm assuming you mean that you searched the forums... I think the only mailing list Milonic had was for the old v3 menu. Not trying to be picky... just don't want other readers to get the impression that there's a v5 mailing list or listserv (unless, of course, there is such a list, in which case I guess I should join!). Anyway, thanks for searching; not everyone does.

Cheers,

Kevin
Post Reply