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:59

Changing menu text


Poster: wpmccormick
Dated: Friday October 31 2003 - 22:17:05 GMT

I would like to change the main menu text to the text of a selected item in a sub menu. I would like to have many of these "new select's" on a page in a form, all with the same menu data. For example, a table would have many of these in different <td>'s:

Code:
<td id=select1>
<SCRIPT language=JavaScript src="new_select.js" type=text/javascript></SCRIPT>
</td>
<td id=select2>
<SCRIPT language=JavaScript src="new_select.js" type=text/javascript></SCRIPT>
</td>

and in new_select.js ...
Code:
with(milonic=new menuname("mainmenu")){
  style=menuStyle;
  top=155;
  left=200;
  overfilter="";
  position="relative";
  alwaysvisible=1;
  aI("text=Make Selection;showmenu=submenu;");
}
drawMenus();

and then the sub menus in menu_data.js ...

Code:
function show(selection) {
????
}

with(milonic=new menuname("submenu")){
style=menuStyle;
aI("text=Select 1;url=javascript:show('Select 1');");
aI("text=Select 2;url=javascript:show('Select 2');");
}
drawMenus();

So my questions are:

1. How can I tell which "new_select" of the many has been selected? And, how can I get the id of <td> container?

2. How do I change the text of the root menu from "Make Selection" to whatever the user has selected?

3. Is there a better/faster way to do this? Maybe position a single instance of the menu dynamically?

4. Is there some on-line documentation that might have helped me with all of this?

I hope I've explained this rather complicated issue well enough and posed my questions in such a manner that you can help me.


Thank you,


Bill McCormick