Changing menu text

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
wpmccormick
Beginner
Beginner
Posts: 1
Joined: Fri Oct 31, 2003 10:47 pm

Changing menu text

Post by wpmccormick »

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: Select all

<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: Select all

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: Select all

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
Post Reply