Spry accordion open panel

Hello,
is there a way, that if I have a page without the accordion, and I click on that page a link, that link goes to the accordion panel page, and when it goes, specifically opens one of the pannels.
THank you

Yes.  But you need the SpryURLUtils.js files.  And you won't find them on Adobe Labs anymore because Adobe abandoned Spry last year.  The files have been moved to GitHub.
Tutorial:
http://foundationphp.com/tutorials/spry_url_utils.php
Spry Files:
Adobe GitHub account
Nancy O.

Similar Messages

  • How to make no panels on Spry accordion open by default?

    I have a Spry Accordion with several panels.  I want the default behavior for none of the panels to be opened until one is clicked.  Currently the default behavior is for the first panel to be automatically expanded when the page is first visited.  How do I correct this?

    It's here:
    http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html
    Under the sub heading "starting with all panels closed".
    <script type="text/javascript">
    var acc1 = new Spry.Widget.Accordion("Acc1", { useFixedPanelHeights: false, defaultPanel: -1 });
    </script>
    Martin

  • Spry Accordion default panel in Master Detail Page

    Hi everyone,
    First time post and need a little help.
    I created a SQL database and put the recordsets in a spry accordion panel as the master section. I have another spry accordion that is my detail section. When I open up the panels in the master section and click on any of the records, it updates the detail region just fine. I did this by passing the record set using php which I don't know, to the detail region. So far, great.
    What I now need to do is when I open a panel, I want that panel to stay open. This dosen't seem to work regardless what I do. I believe that in passing the recordset set between the two regions, it is refreshing the page. I tried using code to pass the panel number too but this is not working.
    Here is the an example of one of the panels.
      <div class="AccordionPanel">
        <div class="AccordionPanelTab"><h3>Doctor Who</h3></div>
        <div class="AccordionPanelContent">
            <table width="385" border="0" class="AccordionPanel" id="content1">
              <?php do { ?>
                <tr>
                <td >
                   <a id="content1" href="?recordID=<?php echo $row_Doctor_Who['prod_key_name']; ?>&panel=1"; > <?php echo $row_Doctor_Who['video_name']; ?></a>
                   </td>
                </tr>
                <?php } while ($row_Doctor_Who = mysql_fetch_assoc($Doctor_Who)); ?>
            </table>
        </div>
      </div>
    <script type="text/javascript">
    <!--
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", {defaultPanel: params.panel ? params.panel: 0, useFixedPanelHeights: false});
    -->
    </script>
    If someone can give me some pointers that would be great. I was also thinking of redoing my menus so when a user clicks on an entry, it will open up another page with that panel open or even going to another section of the same page. I'm not a php programmer and taken a beginners class in HTML and Javascript so if you can keep things simple that would be great.
    Thanks soo much for helping out if you can!

    PHP, being a serverside code, will refresh the page each time there is a request made to the server. JavaScript (and Spry), being a client side code, does not have to send requests to the server and therefore allows you to change the data without a page refresh.
    Having said that, you need to have a Spry dataset in your Accordion panel.
    By following these steps, you will be well on your way to achieving what you want.
    Retrieve your data using PHP and place it in an HTML-table or similar outside of the Accordion panel
    Create a SpryHTMLDataSet based on the HTML-table
    Use the data from the Spry dataset to create a master/detail region in your Accordion panel
    Just a few questions before I go into details.
    Have you set up a connection to a database, thus be able to retrieve the data?
    Why do you need an Accordion panel to show your data?
    Have you got an online URL so that we can follow your code? Otherwise please include your code in your post.
    Please come back here with your answers and we shall try to help you on your way
    Ben

  • Spry accordion open on mouseover with extra content if too fast

    So I already did this and got the spry to open with a hover,
    Go to line 213 (or thereabouts) to find
    Spry.Widget.Accordion.prototype.onPanelTabClick = function(e, panel)
    and change that to
    Spry.Widget.Accordion.prototype.onPanelTabMouseOver = function(e, panel)
    but if you move too fast up and down the menu it opens the other contents and leaves it there see webpage:  move your mouse fast up and down the menu to see.  How do I make sure it is completely closed.  I noticed this does happen to on a Click if you switch too fast between tabs.
    http://www.abbottsportslincoln.com/index.php
    Thanks for any help!
    Jacey

    so is there really no way to fix it? My client already has that, and it's not practical, we want to be able to see all the options for the sub-menus open when we are in one of the tabs.
    Let me know if there is really no way around it.  I'm actually pretty sure that the background for the next tab is stuck behind the content.  Take a look at this site and see how they have a delay in there accordion.
    http://www.targetcenter.com/
    Thanks, Jacey

  • Spry accordion default panel

    I want to set pages of a website so certain panels are
    already open as the default tab when a visitor selects the page.
    I have pasted this text after the existing script at the end
    of my document:
    <script type="text/javascript">
    var acc8 = new Spry.Widget.Accordion("Accordion1", {
    defaultPanel: 2 });
    </script>
    Which ought to open panel 3 when the page loads but is
    doesn't open ANY panels! all it does is indicate the tab as
    'selected' If I change the defaultPanel: to read 0 it correctly
    opens the top panel, but refuses to work for any other panels.
    Here is the site where the script should work:
    http://www.copenhagencandles.co.uk/new/
    Clicking on any of the links in the accordian takes you to
    the correct page, but each time the accordian displays
    closed!

    This is the URL
    /est_help.htm?tab=2&acc3=2
    and this is the markup
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet">
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet">
    <script src="SpryAssets/SpryTabbedPanels.js"></script>
    <script src="SpryAssets/SpryAccordion.js"></script>
    <script src="SpryAssets/SpryURLUtils.js"></script>
    <script> var params = Spry.Utils.getLocationParamsAsObject(); </script>
    </head>
    <body>
    <div id="TabbedPanels1" class="TabbedPanels">
      <ul class="TabbedPanelsTabGroup">
        <li class="TabbedPanelsTab" tabindex="0">Tab 1</li>
        <li class="TabbedPanelsTab" tabindex="0">Tab 2</li>
        <li class="TabbedPanelsTab" tabindex="0">Tab 3</li>
      </ul>
      <div class="TabbedPanelsContentGroup">
        <div class="TabbedPanelsContent">
            <div id="Accordion1" class="Accordion" tabindex="0">
              <div class="AccordionPanel">
                <div class="AccordionPanelTab">Label 1.1</div>
                <div class="AccordionPanelContent">Content 1.1</div>
              </div>
              <div class="AccordionPanel">
                <div class="AccordionPanelTab">Label 1.2</div>
                <div class="AccordionPanelContent">Content 1.2</div>
              </div>
            </div>
        </div>
        <div class="TabbedPanelsContent">
            <div id="Accordion2" class="Accordion" tabindex="0">
              <div class="AccordionPanel">
                <div class="AccordionPanelTab">Label 2.1</div>
                <div class="AccordionPanelContent">Content 2.1</div>
              </div>
              <div class="AccordionPanel">
                <div class="AccordionPanelTab">Label 2.2</div>
                <div class="AccordionPanelContent">Content 2.2</div>
              </div>
            </div>
        </div>
        <div class="TabbedPanelsContent">
            <div id="Accordion3" class="Accordion" tabindex="0">
              <div class="AccordionPanel">
                <div class="AccordionPanelTab">Label 3.1</div>
                <div class="AccordionPanelContent">Content 3.1</div>
              </div>
              <div class="AccordionPanel">
                <div class="AccordionPanelTab">Label 3.2</div>
                <div class="AccordionPanelContent">Content 3.2</div>
              </div>
              <div class="AccordionPanel">
                <div class="AccordionPanelTab">Label 3.3</div>
                <div class="AccordionPanelContent">Content 3.3</div>
              </div>
            </div>
        </div>
      </div>
    </div>
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab: params.tab ? params.tab : 0});
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", {defaultPanel: params.acc1 ? params.acc1: 0});
    var Accordion2 = new Spry.Widget.Accordion("Accordion2", {defaultPanel: params.acc2 ? params.acc2: 0});
    var Accordion3 = new Spry.Widget.Accordion("Accordion3", {defaultPanel: params.acc3 ? params.acc3: 0});
    </script>
    </body>
    </html>

  • Spry Accordion default panels

    Hello,
    I have been trying to get the panels on the Spry Accordion to open while on the corresponding pages. I have tried setting the default panel to the corresponding panel number, but that does not work. Right now I have all of the panels set to -1 so they are all closed initiall. The only one I get to stay open is when I set it to 0, then my first panel will stay open, but if I try 1, 2, 3, etc. nothing happens.
    I really appreciate any help with this, I am a student and this web portfolio is part of a requirement and I would love to get it so funtion properly.
    Thank you,
    Jessica
    here is my url
    http://jessicaallen.us/portfolio_2/index.html
    Here is what I have in my Accordion CSS styles
    @charset "UTF-8";
    /* SpryAccordion.css - Revision: Spry Preview Release 1.4 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    .Accordion2 {
        font-family:"Trebuchet MS", Geneva, Arial, helvetica, san-serif;
        color:#666;
        margin-left:0px;
        margin-right:20px;
        width:260px;
        border:none;
        overflow: hidden;
    .AccordionPanel {
        margin-left: 0px;
        margin-right:20px;
        margin-bottom:0px;
        padding: 0px;
    .AccordionPanelTab {
        color:#666;
        font-weight:bold;
        font-size:14px;
        line-height:18px;
        background-color:transparent;
        border:none;
        margin-left: 10px;
        margin-bottom:0px;
        margin-right:-40px;
        padding: 0px;
        cursor: pointer;
        -moz-user-select: none;
        -khtml-user-select: none;
        text-align:right;
    .AccordionPanelContent {
        font-size:12px;
        line-height:14px;
        color:#666;
        overflow: auto;
        margin: 5px -40px 5px 20px;
        padding: 0px;
        text-align:right;
    .AccordionPanelContent p{
        margin-top:0.5em;
        margin-bottom:0.5em;
    .AccordionPanelContent p a:visited{
        color:#ff9a00;
    .AccordionPanelOpen .AccordionPanelTab {
        color:#f15922;
        background-color: #fff;
    .AccordionPanelOpen .AccordionPanelTabHover {
        color: #f15922;
    .AccordionFocused .AccordionPanelTab {
        background-color: #fff;
    .AccordionFocused .AccordionPanelOpen .AccordionPanelTab {
        background-color: #fff;

    Jessica,
    First of all, I hate you. Perfect web page design, perfect colour co-ordination, perfect drawings not to mention perfect age. It makes this old codger wonder where he has gone wrong 
    Having gotten that off my chest, the problem is that you have two constructors for the same object as per
    <script type="text/javascript">
    <!--
    var Accordion2 = new Spry.Widget.Accordion("Accordion2");
    //-->
    </script>
    <script type="text/javascript">
    var Accordion2 = new Spry.Widget.Accordion("Accordion2", { useFixedPanelHeights: false, defaultPanel: -1 });
    </script>
    Just get rid of the first one and apply the correct panel number, for example Fine Arts use
    <script type="text/javascript">
    var Accordion2 = new Spry.Widget.Accordion("Accordion2", { useFixedPanelHeights: false, defaultPanel: 6 });
    </script>
    Gramps

  • Spry Accordion Closing Panels

    Guys
    New to Spry Accordion. At the moment I've managed to
    configure the .js file to make the panels automatically closed on
    start-up. They open fine when clicked, but a second click on the
    headers won't then close the panel - it only closes on selection of
    the next panel.
    Can anyone (in simple terms!!) advise where I'm going wrong?
    Thanks in advance.
    Steve

    http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html
    This feature is only supported when using variable height
    panels, so you must pass a false into the Accordion's constructor
    for the
    "useFixedPanelHeights" constructor option, and a -1 for the
    "defaultPanel" option:
    <script type="text/javascript">
    var acc1 = new Spry.Widget.Accordion("Acc1", {
    useFixedPanelHeights: false, defaultPanel: -1 });
    </script>
    Ken Ford
    Adobe Community Expert - Dreamweaver
    Fordwebs, LLC
    http://www.fordwebs.com
    "Centaurus18" <[email protected]> wrote in
    message news:fvktgv$77t$[email protected]..
    > Guys
    >
    > New to Spry Accordion. At the moment I've managed to
    configure the .js file
    > to make the panels automatically closed on start-up.
    They open fine when
    > clicked, but a second click on the headers won't then
    close the panel - it only
    > closes on selection of the next panel.
    >
    > Can anyone (in simple terms!!) advise where I'm going
    wrong?
    >
    > Thanks in advance.
    >
    > Steve
    >

  • Spry Accordion open on page load

    How do you stop the Spry Accordion from being open while the page is loading - as soon as the page loads the Accordion closes to the way it has been designed - it is just annoying!

    Starting with All Panels Closed
    This feature is only supported when using variable height panels, so  you must pass a false into the Accordion's constructor for the  "useFixedPanelHeights" constructor option, and a -1 for the  "defaultPanel" option.
    Gramps

  • Spry Accordion Different Panel Heights

    I'm building a Spry Accordion Widget as a left nav menu with
    25 different panels. Some of my panels contain 10 different links
    and others contain only 1 single link. Therefore I would like to
    adjust the height of each panel individually according to the
    number of links they contain, so I don't end up with huge white
    spaces in panels that contain fewer links. My initial idea, in
    addition to the .AccordionPanelContent class was to add an "id" to
    each panel and control each panels height through CSS. But for some
    reason I haven't been successful that way. It looks like all panels
    tend to take the height of the first panel, regardless of their
    individual set heights. I wonder if I can resolve my problem
    uniquely with CSS, or I do I have to go and change something in the
    SpryAccordion.js file.
    Thanks.

    Hi Donald, I inserted <script type="text/javascript">
    var acc1 = new Spry.Widget.Accordion("Acc1", {
    useFixedPanelHeights: false });
    </script> into my code. It's almost there, but not
    quite. I can see that it is trying to re-ajust the panels' height,
    but for panels that have a larger content it tends to show the
    whole panel's content and then hides the half of it. Also for
    panels with fewer content it doesn't seem to have an effect at all.
    I don't know if I have to fix something in the CSS or place the
    Acc1 ID in a different location within my accordion HTML code.
    Thank you.
    Here's the URL I'm working on if you want to take a look.
    http://64.49.218.100/product_p/00-120-0ll.htm

  • How to make spry accordion open on mouse hover ?

    hi everybody i have just a simple question about spry accordion in cs4 it try to open it using mouse hover not onclick
    can anyone help me plz ?

    This is one way
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel">
        <div class="AccordionPanelTab" onMouseOver="Accordion1.openPanel(0); return false;">Label 1</div>
        <div class="AccordionPanelContent">Content 1</div>
      </div>
      <div class="AccordionPanel">
        <div class="AccordionPanelTab" onMouseOver="Accordion1.openPanel(1); return false;">Label 2</div>
        <div class="AccordionPanelContent">Content 2</div>
      </div>
    </div>
    <script type="text/javascript">
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    </script>
    </body>
    </html>
    Another way is to have a SpryEventListener. Look that up for further info.
    Ben

  • Spry Accordion letztes Panel speichern

    Hi,
    ich habe auf der Seite www.hittfeld-sharks.de das Spry Accordion verwendet.
    Wenn man sich dort allerdings links durch die Mannschaften klickt ist es ziemlich nervig, dass sich immer wieder das defaultPanel öffnet. Kann man das umstellen, dass sich "beim ersten Öffnen" das default Panel öffnet, aber dann immer das, welches als letztes offen war ?
    Greets

    PHP, being a serverside code, will refresh the page each time there is a request made to the server. JavaScript (and Spry), being a client side code, does not have to send requests to the server and therefore allows you to change the data without a page refresh.
    Having said that, you need to have a Spry dataset in your Accordion panel.
    By following these steps, you will be well on your way to achieving what you want.
    Retrieve your data using PHP and place it in an HTML-table or similar outside of the Accordion panel
    Create a SpryHTMLDataSet based on the HTML-table
    Use the data from the Spry dataset to create a master/detail region in your Accordion panel
    Just a few questions before I go into details.
    Have you set up a connection to a database, thus be able to retrieve the data?
    Why do you need an Accordion panel to show your data?
    Have you got an online URL so that we can follow your code? Otherwise please include your code in your post.
    Please come back here with your answers and we shall try to help you on your way
    Ben

  • Accordion opening panel

    I inserted an accordion with two panels. Panel 1 - and Panel
    2 is at the bottom. When I click on Panel 2, it opens Panel 1 to
    full view. and when I click on Panel 1, it opens Panel 2 to full
    view. How do I fix it so if I click on panel 2, panel 2 opens to
    full view and if I click on panel 1, panel 1 opens to full
    view?

    Well I cannot post it to production on the website, it is
    only in my testing stage area. Can I attach the .htm document -
    .css and .js files somewhere or e-mail them?
    When the page loads there are two panels, panel 1 shows with
    a scrollbar, and panel 2 shows under that - which panel 2 displays
    the entire panel. When I click on panel 1, it doesn't show the
    entire panel for panel1, it just stays there with the scroll bar. i
    want to be able to click on Panel 1 and then it show the entire
    panel for panel 1 and then panel 2 will be shortened with the
    scroll bar and vise versa.

  • Spry Accordion- all panels closed by default

    1) Can I have an accordion so that none of the panels are open by default?
    2) Changing the height of the panels: Can it be set determined by the amount of content inb a panel?  I have 5 panels, and each is populated with data from a database. some may need much more room than others.
    Thx,

    You can add it immediately after the Accordion if you want to - but then you end up with scripts scattered throughout your page(s).
    Most of the time I see it added to the bottom of the page.  I also do this as I've had several SPRY Elements doing stuff at one time and you can simply combine them into a single list.
    Add adri_grace's Code in a Script Tag to the same page that the Accordion is located on.
    At the very bottom - just before the Closing for the BODY and HTML Tags.
    So you end up with something like:
    <script>
    var Accordion1 = new Spry.Widget.Accordion("Accordion1",.....
    .....{ useFixedPanelHeights: false, defaultPanel: -1 });
    var Accordion2 = new Spry.Widget.Accordion("Accordion2",.....
    .....{ useFixedPanelHeights: true, defaultPanel: 3 });
    var Accordion3 = new Spry.Widget.Accordion("Accordion3",.....
    .....{useFixedPanelHeights:false, enableAnimation:false});
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1",.....
    .....{defaultTab:7});
    </script>
    </body>
    </html>
    Go here:
    http://labs.adobe.com/technologies/spry/samples/
    Click on the Widgets Tab.
    *the dots for each example above are for continuity in the word-wrap - don't include in code.

  • Spry accordion - open url in separate frame on click

    I'm trying to load a page in a frame at the same time a user clicks on an accordian panel.
    Javascript doesn't seem to fire and I can't find help on the topic.
    Can someone point me in the right direction?

    Although this example http://labs.adobe.com/technologies/spry/samples/utils/updateContent_TabbedPanels.html is for tabbed panels, the same can be applied to an accordion.
    Gramps

  • How to make Spry Accordion Content Panel with a variable content fit

    I have a problem.  The content panel has a fixed length so I changed it to auto so I can view all the content of each panel.  The problem is that the content panel takes the dimensions of the longest content and applies that to ALL the panels.  So as you click from one to the other, some are practically empty with all the space, while others seem full. 
    The question is, is there a way to vary the size of the content panel so on one that has not a lot of content stays to that size.  This is the way I have the CSS for that.  How can I achieve the variable heights?
    .AccordionPanelContent {
    overflow: auto;
    margin: 0px;
    padding: 5px 4px 6px 15px;
    height: auto;
    background: url(../images/backgrcolor0033.png);
    color: #FFF;
    Thank you.

    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 1</div>
        <div class="AccordionPanelContent">Content 1</div>
      </div>
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 2</div>
        <div class="AccordionPanelContent">Content 2</div>
      </div>
    </div>
    <script type="text/javascript">
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false });</script>
    </body>
    </html>
    Gramps

Maybe you are looking for

  • Adobe Media Encoder Fails Export from Premiere

    AME will not start the render qeue. I have tried Clip notes and different output types. I have embedded After Effects comps in my Premiere timeline. Could that be a cause? This is my first time working with Premiere and AE together. Error log below:

  • Adobe Flash Player will NOT work!

    I am using Windows 7 and I am unable to watch any videos or listen to any music on websites such as youtube, iplayer, 4od and so on, which is very frustrating. I have installed and uninstalled Flash Player several times today, and tried it out on a v

  • Why doesn't Firefox completely uninstall ?

    Why does Firefox 22 on a Mac Os not completely uninstall? when I remove the application on the Mac by dragging the application to the garbage and then reinstall, my book marks are still present. Why? All applications should completely uninstall but F

  • "Could not find a match" error when passing parameter prefixed with "std::"

    We're moving from Solaris 8 to Solaris 10, and I'm compiling our C/C++ applications using the Sun Studio 8 C++ compiler to verify that they'll still run correctly under Solaris 10. All is well except for an error I'm getting on my Solaris 10 system b

  • OEM fails installing Ora10G in Red Hat ES/AS 3

    During the install of Oracle Database 10G v.1.0.3, the last version, in Red Hat Linux ES/AS 3, it fails when installing the OEM, and in the log file the next error is write : v-2004 18:04:29 oracle.sysman.emcp.EMConfig checkParameters GRAVE: Failed t