2 menus in 2 cells

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
e69mt
Beginner
Beginner
Posts: 1
Joined: Tue Aug 31, 2004 12:44 pm

2 menus in 2 cells

Post by e69mt »

I am trying to put 2 menus in 2 cells. I am using relaitve position for each.

I tried:

Code: Select all

<tr>
  <td><script>drawMenus();</script></td>
  <td align=right>two<script>menuDisplay(gmobj("Culture"),1);</script></td>
</tr>
still I get both in the first cell.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Are both these menus to be visible? If that's the case then you should be able to do it but from the code you have I can't figure out what you're doing [though someone more knowledgeable might understand] So, a test page would be really helpful to see all the code, if that's possible.

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

Post by kevin3442 »

Hi,

You have a couple of issues. First, the way you've tried to display a menu in a cell is not quite correct. Just putting a call to drawMenus() in a table cell is not the right approach (this is actually why both of your menus end up in the same cell). Second, your use of menuDisplay() is incorrect... I see where you were ging logically, but it won't work that way. The menu does not open in the position (i.e., the cell) containing the call to menuDisplay(). In other words, menuDisplay() doe not affect the position of the menu. Rather, menuDisplay() will open the designated menu at a screen location that has already been set through various other processes (maybe you were thinking of the PlaceMenu() function from v3 menus, but it doesn't work that way).

You should have a look at this sample for table-bound menus, and follow the instructions exactly. You also may want to look at some other positioning examples to see if using tables is really the way you want to go; there are lots of alternative approaches that can often make using tables unnecessary.

Hope that helps,

Kevin
Post Reply