One specify question about keepalive

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
queque51
Beginner
Beginner
Posts: 2
Joined: Wed Sep 03, 2003 12:02 pm

One specify question about keepalive

Post by queque51 »

I need make a menu with a particular specifications:

Only need main menus, no submenus

When I click in one option, this must appear clicked (color change) until click in another option.

I try keepalive but this property not affect aparently

Any help, example?

Thanks. Excuse my poor english I'm spanish.
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

onbgcolor="#316AC5";
onborder="1px solid #316AC5";
oncolor="#000000";

Any of these help?

maz
queque51
Beginner
Beginner
Posts: 2
Joined: Wed Sep 03, 2003 12:02 pm

Exactly, not.

Post by queque51 »

You help me good, to realise the sensation of push menu, but when I go outside of the clicked menu, this restore itself to original values. I need mantain the menu clicked until I don't click on another menu.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Change the class or style of the menu item on click. This should be done by calling some sort of javascript function from the url (url=javascript:itemClicked()). If you need further explanation, let me know.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
landolt
Beginner
Beginner
Posts: 3
Joined: Wed Sep 03, 2003 11:56 am

Post by landolt »

hey, thats exactly what i want. but if call the function it comes the error "function not found"

i have tried to declare the function:

- i the top where my menu is
- in the top of milonic_src.js file
- in the top of mmenudom.js file
- in a separate file

where do you declare your function "itemClicked" ??
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

You should probably declare itemClicked() in the head of your document, before you include any other menu source files. It should find the function with no problems then. For troubleshooting, make itemClicked do nothing but put up an alert() box to let you know its being called correctly. THen start to put in CSS changes.
Regarding how to change the styles of the menu items on the fly, I havent worked much with that (yet) but I know it can be done. Once you get this far, we'll further this thread in that direction to see if we can do that.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply