Advanced Search

Results 1 to 3 of 3

Thread: Bullet List Accordion Menu Works From Local Folder But Not On Site

  1. #1
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Bullet List Accordion Menu Works From Local Folder But Not On Site

    1) Script Title:
    Bullet List Accordion Menu
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...enu-bullet.htm
    3) Describe problem:
    First of all, please excuse my extreme novice-ness when it comes to HTML / Java / etc. Perhaps I am just doing something totally stupid and obvious. (I hope that's the case.)
    Anyway, I'm building a site about Chinese herbs and I installed this Accordion Menu to allow users to search for herbs by the first letter. After entering just a bit of the accordion menu content, I decided to test it out. When I load the page in Firefox from its local folder (C:\....) the accordion menu works fine. But when I load the page from its internet location - www.chineseherbinfo.com - it doesn't work. Clicking on one of the menu buttons doesn't do anything. I can't figure out why. It's the same HTML file and the ddaccordion.js file is present in both locations.
    Incidentally, if there is a cleaner or better way to accomplish what I am trying to do (give people a way to look up any of about 350 herbs in a compact way), I'd be open to that.
    Any help (preferably in the simplest possible language) would be much appreciated.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,862
    Thanks
    3
    Thanked 959 Times in 948 Posts
    Blog Entries
    15

    Default

    In your initialization code for the menu, there should be a line break right before the "defaultexpanded" option below:

    Code:
    ddaccordion.init({
    headerclass: "expandable", //Shared CSS class name of headers group that are expandable
    contentclass: "categoryitems", //Shared CSS class name of contents group
    revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
    mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
    collapseprev: true, //Collapse previous content (so only one open at any time)? true/false defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
    onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
    animatedefault: false, //Should contents open by default be animated into view?
    persiststate: true, //persist state of opened contents within browser session?
    toggleclass: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
    togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
    animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
    oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
    //do nothing
    },
    onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
    //do nothing
    }
    })
    In other words, the code should be:

    Code:
    <script type="text/javascript">
    ddaccordion.init({
    headerclass: "expandable", //Shared CSS class name of headers group that are expandable
    contentclass: "categoryitems", //Shared CSS class name of contents group
    revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
    mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
    collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
    defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
    onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
    animatedefault: false, //Should contents open by default be animated into view?
    persiststate: true, //persist state of opened contents within browser session?
    toggleclass: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
    togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
    animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
    oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
    //do nothing
    },
    onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
    //do nothing
    }
    })
    </script>
    DD Admin

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

    Anahata (01-04-2012)

  4. #3
    Join Date
    Jan 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Thanks, that did it!

    I think KompoZer must have altered that.
    Btw, if someone can recommend a better similar program, I'd appreciate it.

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
  •