07-12-2007, 07:44 PM
<div id="t2" style="display:none;">
^ here is the code i have got for a drop down menu.
When somebody clicks on it, i want the css style to change...I cant seem to do this as onClick is already being used :S
07-12-2007, 08:05 PM
Iím not the baddest JS pro but I think you can without problems fire more than one functions in the event handler.
onclick="function1(); function2(); return false;">link</a>
07-12-2007, 08:52 PM
onclick="function1(openDiv('t2')">); function2(simple_menu); return false;">link</a>
^^ i did that but no luck
07-12-2007, 08:55 PM
That was just an example.
onclick="openDiv('t2'); simple_menu(); return false;">link</a>
07-12-2007, 08:58 PM
^^ thts the link..It stil dont seem to work :S
07-12-2007, 09:10 PM
It would help if you actually had good html. Your coding is awful.
You have this
change it to this
<div class="menu_button" onclick="openDiv('t2');">Finance & Legal Services</div>
Now that we got that straightened out. What exactly are you trying to do? You have no simple_menu() function. What styles do you want to apply to the divs? I see you already have class="simple_menu" on the divs. Can you not just use that?
07-12-2007, 09:44 PM
When a user clicks on the button, i want its sub-buttons to open up, whilst the first buttons changes its style..When clickd upon.