Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:17

Having one menu open another on click, and keep it alive?


Poster: Brannmark
Dated: Monday August 25 2003 - 16:37:54 BST

Anyone tried this:

I have a website that should have a horiztontal menu. Some items
should open a new menu on the left side of the page. I understand that this could be done with this menu. But here is the tricky part. When a user click on one of the items on the new menu, and the page is reloaded, I want the new menu to still be open....

Can this be done without using frames???

/Brannmark


Poster: Hergio
Dated: Monday August 25 2003 - 18:28:47 BST

Yup but I think it would be easiest if you use asp or php. When the user clicks on a link in the menu it should send a parameter in the URL to the new page with instructions on what to keep open. So if you clicked a link it would go to "page.asp?keepopen=3", for example. Then in the new page, parse the URL, and depending on what the number is, you can dynamically set the alwaysvisible flag of whatever menu 3 pertains to...
Code:
...
alwaysvisible=<%if(Request("keepopen")==3)Response.Write("1");%>
...

Besides that, we still have yet to come up with a clean way to dynamically set the alwaysvisible attribute using pure javascript from within the page...but it will come. ;)


Poster: Brannmark
Dated: Monday August 25 2003 - 18:45:56 BST

Ok, thanks.

I'm going to make the menu by using asp and a db. The website consits of one page only. When the user clicks on an item, the page is reloaded with new data from the db...

How would one solve this problem with using just one page..... I cant set the alwaysvisible tag in the "new" page....

Could I perhaps throw up a session variable to set the alwaysvisible tag, hmmm..... I have to think about this for awhile....

Ok, now I think I got it.... if I make an if state where it gets a parameter on which menu should have alwaysvisble statement. When the user clicks on another menu item that doesnt have the parameter the if statement should set alwaysvisible to 0.....

Perhaps that will work...

By the way, anyone built an asp and db solution of this menu?

/Anders


Poster: Hergio
Dated: Monday August 25 2003 - 20:16:38 BST

Thats exactly what I was entailing. You pass the parameter to the page and it shows the menu you want it to...no parameter, no menu. Its easier than a session variable.

Yes people have made DB implementations of the menu, but mainly very proprietary and home-grown ones. Basically just looping through their recordsets and creating the JS file in the asp page.... If anyones got one, they might give it to you but its probably not a generic type of plug and play. But maybe someday.... ;)


Poster: Brannmark
Dated: Monday August 25 2003 - 22:45:10 BST

Ok, thanks for the help. I will try this out...

/Anders