Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Accordion Menu script (v1.3) headers not expanding correctly

  1. #1
    Join Date
    May 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Accordion Menu script (v1.3) headers not expanding correctly

    1) Script Title: Accordion Menu script (v1.3)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ordionmenu.htm

    3) Describe problem:
    Accordion Menu script (v1.3) isn't expanding the correct header when a subheading link is chosen. I have worked out that it works great when all the pages (files) are in the same folder but as the site I have built has many folders to organise all the different sections of the website this seems to stop the expanding of the headers working correctly.

    If I have a submenu page open and I click on another submenu selection (under a different header) the previous header is expanded instead of the correct header. The correct page is displayed though.

    Anyone know how to make the script work when there are pages stored in different folders?

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I think you're talking about the persistence feature not persisting the correct header when going from one folder on your site to the next right? If so, this is simply due to the fact that the cookie feature in the script is localized to each folder. You can change it to site wide by making the changes in red to the below inside ddaccordion.js:

    Code:
    	setCookie:function(name, value){
    		document.cookie = name + "=" + value+"; path=/"
    	},

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    catchgraphics (05-24-2008)

  4. #3
    Join Date
    May 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Brilliant!

    Thanks a million! I have only trialled the script changes in a couple of browsers so far but that was exactly what I wanted!

    I really appreciate that – I have been trying to solve that for days so it is such a relief to have that working now.

    Again many thanks!

    Michael

  5. #4
    Join Date
    May 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default ie6 doesn't expand header

    Hi, thanks again for your help. I have finished all my testing in browsers and found the accordion menu with that new tweak makes the navigation work great in all browsers except one – ie6. In IE6 the headers are closing up instead of expanding (as they do in all the other browsers). Is there any way to get ie6 to work properly?

    Many thanks for any help you give.

  6. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmmm does your page contain a valid doctype at the very top? If so, please post a link to the problem page.

  7. #6
    Join Date
    May 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I think it is valid. I have been working on the site locally but have uploaded the test site for you to look at: http://www.catchgraphics.com/futrix/...mancetools.php

    Again many thanks for all your help – it is just fantastic.

  8. #7
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Try removing the code:

    Code:
    <script type="text/javascript">
    //Start Tab Content script for UL with id="maintab" Separate multiple ids each with a comma.
    initializetabcontent("maintab")
    
    var param=window.location.href.match(/selectedtab=(\d+)/i)
    if (RegExp.$1!="")
    expandtab('maintab', RegExp.$1)
    </script>
    It's generating a script error, which in the case of IE, usually throws off the other scripts on the same page as well. It doesn't look like you're actually using Tab Content script on your page.

    BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice: http://www.dynamicdrive.com/notice.htm

  9. #8
    Join Date
    May 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for that. I will fix that and let you know how I get on.
    Cheers

  10. #9
    Join Date
    May 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi I have made those changes but IE6 is still not expanding the headers. Do you have any other suggestions?
    Many thanks

  11. #10
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ok, upon some testing, it seems IE6 isn't setting the cookie for some reason. I'll have to get back to this later next week and post the fix then (if not, just remind me ).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •