Using menu as a <select> replacement?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
eggnog
Beginner
Beginner
Posts: 1
Joined: Thu May 05, 2005 9:27 pm

Using menu as a <select> replacement?

Post by eggnog »

Is it possible to set up the menu so it would work as a replacement of the select menu? I can handle setting the selected value with a hidden input set via javascript, but the missing piece is to have the collapsed menu show the selected option (like a <select> would). Is there some parameter I can use to set this, or some additional javascript trickery I can do to make this work?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

There is a demo about using the Milonic Menu as a select box and also in the same demo is information on putting a select box in the menu. I think the first is what you want mm_setSelected is the function.

Milonic Menu as a select box 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:

Post by kevin3442 »

Hello,

Just to add (since I did the mm_setSelected() function that Ruth mentioned)... Both approaches are a variation on the same theme. Both should work well. It's just that I took my example a little further and actually implemented the solution in a form, using a text field as a "holder" for the value that's selected from the menu item that poses as a select box. As you've already surmised, in a real form implementation, you'd hide the "holder" field and use it's contents in subsequent processing of the form input. The mm_setSelected() function will set the value of the holder field and change the text in the collapsed menu to show the selected value.

Cheers,

Kevin
Post Reply