PDA

View Full Version : Accordion problems



Jimbly2
05-09-2010, 11:23 AM
1) Script Title: Accordion

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu.htm

3) Describe problem: Link to my page here:
http://www.madhouse1.com/jim/menu2.php

Ok - firstly I can't seem to make the headers drop the correct content section.. the first header ( Home) drops the second content (who we are ) - the second header drops the fourth - why?

Secondly, when the user clicks on a header ( on click? on init? ) I want the image to change to a different one. I have looked through the examples on the script site but don't understand how to do it.

I'm in trouble now as the client wants to see something.. :-o Help!

Thanks
Jim

ddadmin
05-09-2010, 09:16 PM
The header/sub content mismatch is due to the fact that you've given all of your headers a CSS class of "menuheaders" regardless of whether each one actually contains a sub content (DIV with class="menucontents"). You can solve the issue simply by changing the CSS class of all headers that do NOT contain a sub content to something else, for example: "singlesheader":


<div class="singlesheader"><a href="notable_cases.php" title="Forums" target="_self" onMouseOver="MM_swapImage('Image58','','images/menu1_r11_c1.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="images/menu1_r27_c1.gif" alt="Merchandising" name="Image58" width="167" height="30" border="0" id="Image58" /></a></div>

As to the 2nd question, are you basically asking how to have the menu automatically highlight the current menu header the page corresponds to?

Jimbly2
05-10-2010, 09:19 PM
Hi - yes, so when the user clicks on a menu item, goes to that page, the image for that page changes to a highlighted one. Maybe this isn't possible and I need to have a menu on each page which I can then customise, instead of trying to use a #include?

Thanks for your help -

Jim

ddadmin
05-11-2010, 08:56 AM
There's no way for the script to automatically determine that relationship between the current page and the menu item that should be expanded. You would need to use what's available from the script's side as far as expanding a menu item (http://www.dynamicdrive.com/dynamicindex17/ddaccordion_suppliment.htm) after it's initially loaded, plus your own ingenuity, to make this happen.

Jimbly2
05-11-2010, 03:31 PM
No worries - will use a separate instance of the menu on each page - then it's a no brainer to change the relevant image.

Thanks,
Jim