Why default panel in Spry Accordeon doesnt work ?

The solution do the default panel when a new page is loaded seems to be:
<script type="text/javascript">
var acc1 = new Spry.Widget.Accordion("Acc1", { defaultPanel: x });
</script>
(x=number of the panel minus 1)
This is written in many tutorials.
But i've tried and only works with default panel 0. When i try with
number 2 for instance, the head/tab is marked but doesnt expand.
Anyone knows what's wrong ?

I don't see any defaultPanel options in your constructor..
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
//-->
</script>
Should be:
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1", {defaultPanel:2});
//-->
</script>
Keep in mind that default panels are zero based, so panel 1 is actually panel 0.

Similar Messages

  • Why is the fb video call doesnt work with macbook?

    why is the fb video call doesnt work with macbook?

    Hi
    Just to correct GerdW - the vis of a polymorphic vi do not have to have the same output.
    Have a look at the vis I attached. I just pass a dbl to a polymorphic vi and get a dbl in one vi and a string in the other.
    The real problem is that the vi has to be set to the necessary type. If there are different inputs you just can wire them to the polymorphic vi, but this does not work with the outputs, so you have to set the type.
    Hope this helps.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    Polymorph.zip ‏14 KB

  • Why does the polymorphi​c vi doesnt work??

    why does the polymorphic vi doesnt work??
    if i connect the output with an string or double array there is always an error.
    why?
    markus
    Attachments:
    DeCoderVIs.llb ‏62 KB

    Hi
    Just to correct GerdW - the vis of a polymorphic vi do not have to have the same output.
    Have a look at the vis I attached. I just pass a dbl to a polymorphic vi and get a dbl in one vi and a string in the other.
    The real problem is that the vi has to be set to the necessary type. If there are different inputs you just can wire them to the polymorphic vi, but this does not work with the outputs, so you have to set the type.
    Hope this helps.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    Polymorph.zip ‏14 KB

  • Spry Effects doesnt work with position:absolute CSS

    HI guys,
    I have a text with position: absolute; left: 20px; top: 10px;
    to it and using Spry's Fade Effect, it just shows it without any
    fade animation, any ideas why?
    quote:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    <script src="assets/SpryAssets/SpryTabbedPanels.js"
    type="text/javascript"></script>
    <script src="assets/SpryAssets/SpryEffects.js"
    type="text/javascript"></script>
    <script src="assets/SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="assets/SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <link href="assets/SpryAssets/SpryTabbedPanels.css"
    rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    .TabbedPanelsContent {
    background-color: #006699;
    .cool {
    background-color:#993366;
    position:absolute;
    left: 20px;
    top: 10px;
    -->
    </style>
    <script type="text/javascript">
    <!--
    function TabbedPanelsCycler(tp)
    this.tp = tp;
    this.timerID = 0;
    this.interval = 5000; // Milliseconds
    TabbedPanelsCycler.prototype.start = function()
    this.stop();
    var self = this;
    this.timerID = setTimeout(function() { self.next(); },
    this.interval);
    TabbedPanelsCycler.prototype.stop = function()
    if (this.timerID)
    clearTimeout(this.timerID);
    this.timerID = 0;
    TabbedPanelsCycler.prototype.next = function()
    var tp = this.tp;
    Spry.Effect.DoFade('Content' + (tp.getCurrentTabIndex()+1) %
    tp.getTabbedPanelCount(), {duration: 1000, from: 100, to: 0,
    toggle: false, finish: function(){
    var el = document.getElementById('Content' +
    ((tp.getCurrentTabIndex() + 1) % tp.getTabbedPanelCount()));
    tp.showPanel((tp.getCurrentTabIndex()+1) %
    tp.getTabbedPanelCount()); // 1, 2, 3, 4, 0 ... loop
    Spry.Effect.DoFade('Content' + (tp.getCurrentTabIndex() + 1)
    % tp.getTabbedPanelCount(), {duration: 1000, from: 0, to: 100,
    toggle: false});
    if (this.timerID)
    this.start();
    TabbedPanelsCycler.prototype.previous = function()
    var tp = this.tp;
    var curIndex = tp.getCurrentTabIndex();
    tp.showPanel(((curIndex < 1) ? tp.getTabbedPanelCount() :
    curIndex) - 1);
    if (this.timerID)
    this.start();
    function MM_effectAppearFade(targetElement, duration, from,
    to, toggle)
    Spry.Effect.DoFade(targetElement, {duration: duration, from:
    from, to: to, toggle: toggle});
    var dsFeaturebox1 = new
    Spry.Data.XMLDataSet("assets/xml/featurebox_data.xml",
    "featurebox/feature1");
    //-->
    </script>
    </head>
    <body onload="cycler.start();">
    <div id="TabbedPanels1" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab"
    onclick="MM_effectAppearFade('Content1', 1000, 0, 100, false)"
    tabindex="0">Tab 1</li>
    <li class="TabbedPanelsTab"
    onclick="MM_effectAppearFade('Content0', 1000, 0, 100, false)"
    tabindex="0">Tab 2</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent" id="Content1">
    <div>Normal text here</div>
    </div>
    <div class="TabbedPanelsContent" id="Content0"
    spry:detailregion="dsFeaturebox1">
    <div class="cool">{XML text here}</div>
    </div>
    </div>
    </div>
    <script type="text/javascript">
    <!--
    var tp1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    var cycler = new TabbedPanelsCycler(tp1);
    //-->
    </script>
    </body>
    </html>
    Thanks,
    J

    Hi guys,
    I just would like to know why adding position: absolute on my
    css would stop the Spry Effects from doing its job? Thanks!

  • Why Trend Micro Nsc FireFow Extension doesnt work?

    how do i get my anti virus to work with FireFox 4.1

    Apologies for the slow response.
    Firefox is on a time based release cycle, every 6 weeks we release a new version (more or less a few days). There are over 6,000 extensions available for Firefox, almost all of them from third-party developers. When Firefox switched to a new release cycle back in the beginning of 2011, all of those extension developers we notified of the change and how it would impact them. Some of them choose not to mark their software as compatible until it work for them. If Firefox were to wait until even 80% of the extensions were marked as compatible, there would never be an update. The responsibility to update add-ons is on the extension developer. Unfortunately, some choose to wait :/
    Now, all that said, Mozilla does want to ease the pain of upgrades, so there are lots of ways we are working to improve the update process. [http://blog.mozilla.com/futurereleases/2012/02/03/improving-the-firefox-update-experience/ http://blog.mozilla.com/futurereleases/2012/02/03/improving-the-firefox-update-experience/] has some of the changes we have launched in the past few weeks.

  • Accordian Set Default Panel Issues

    I have a default panel that I am setting in my pages and when
    I set default panel to 0 then it opens the first one, but now when
    I try to set default panel to 1 it won't open the second one.
    http://208.112.121.107/company/mission-statement.asp
    (This has the default panel set = 0, Works!)
    http://208.112.121.107/company/management-team.asp
    (This has the default panel set = 1, doesn't work)
    Any help would be appreciated.
    Thanks!

    Nevermind I figured it out!

  • Camera's doesnt work

    Hello, sometimes when my back camera works i try to put my frontal camera and it doesnt work, and sometimes the back camera doesnt work too, is not a update problem i have reset to default and the frontal camera doesnt work, please i need your help an ipod without the both cameras is not an ipod.  Thanks

    When restoring to factory settings fails to resolve the problem that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • 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

  • Can anyone explain why all of my Spry Assets on a live website have suddenly stopped working?

    Can anyone explain why all of my Spry Assets on a live website have stopped responding? I have checked that the Spry CSS and JS files are in place. Then checked the files on Dreamweavers live view and they are not working there either. It was fine a few weeks ago, it is almost as if the web browsers have stopped rending Spry, for example, the links for the collapsible panels are not even being recognised as links.
    I am using 'old' spry assets on Dreamweaver CS4 (if that makes a difference). The Spry Assets used are Tabbed Panels and Collapsible Panels.
    Thanks for your help.

    Something has been going on, when I look at the bottom of your document (as pasted below), this is normally all at the top after the links to external style sheets.
    <script src="js/jquery-1.10.2.min.js"></script>
    <script src="js/lightbox-2.6.min.js"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
       <script type="text/javascript" charset="utf-8" src="Menu_Photography_edgePreload.js"></script>
       <script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
       <script type="text/javascript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
      var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
      if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
      if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>

  • Why this path doesnt work when there is "!DOCTYPE" element?

    Hi, I need to extract contents from an xml file, which looks like
    <hr />
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE article PUBLIC "-//ES//DTD journal article DTD version 5.0.1//EN//XML" "xyz501.dtd" > <!-- LINE 1 -->
    <article docsubtype="fla">
    <item-info>
    <jid>YANBE</jid>
    <aid>12941</aid>
    </item-info>
    </article>
    <hr />
    And I have tested with this path "//article/item-info/jid/text()", but it doesnt give me anything. But I noticed that when I remove line 1, it does extract the content "YANBE"...
    why the path doesnt work when there is that DOCYTYPE element? How should I get around with this please?
    Many thanks!

    The extract of XML you gave is not valid (Line 1: <hr/>) but besides that ... I think your problem is in the DTD.
    Somewhere in the DTD it probably 'sneakily' defines a default attribute which in reality is a default-namespace for one of the elements. This means that in your XPath handling, you will have to map a prefix to a namespace-uri (NamespaceContext [1]) and use this newly defined prefix in your XPath expression.
    //tst:article/tst:item-info/tst:jid/text()[1] http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/namespace/NamespaceContext.html

  • My Ipod Touch conects to my wi-fi, but when I open safari, or any other app that needs internet, it doesnt work. what should I do and why is this happening?

    My sister bought me an ipod touch less than a month ago. when he first came, he was conecting normal to my wifi, but today, he isnt. I use the same wifi at my laptop, and its perfectly working. My ipod identify the network, conects to it, but when I open an app that needs it, it doesnt work. What should I do?
    And why is this happening?

    - Reset the iPod. Nothing will be lost
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on your router
    - Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections

  • Why my hp mini 5101 the "7" key doesnt work after upgraded the bios?

    why my hp mini 5101 the "7" key doesnt work after upgraded the bios?
    The current bios version is F.07

    korpx,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • The cap lock key doesnt work sometimes, why? 13 pro(2013, late)

    The cap lock key doesnt work sometimes, why? 13 pro(2013, late)

    Hi, BOSCO_LIN. 
    Here is a helpful article that will walk you through troubleshooting the issue with your caps lock not responding.
    One or more keys on the keyboard do not respond
    http://support.apple.com/kb/ts1381
    Regards,
    Jason H.

  • How to hide the default panels of a dreamweaver spry tabbed panel?

    i put several spry tabbed panels in the same page (one widget inside the other). the problem is that when the page loads all of the default panels (4 in total) appear for about 6 seconds and then they collapse into the main pannel. how do i fix this?
    you can see this problem in this page:
    http://www.eye-dealswing.com/Parents/WhereToStay/index1.html
    do i need to add something in this section?
    <script type="text/javascript">
    <!--
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"…
    //-->
    </script>
    <script type="text/javascript">
    <!--
    var TabbedPanels3 = new Spry.Widget.TabbedPanels("TabbedPanels3"…
    //-->
    </script>
    <script type="text/javascript">
    <!--
    var TabbedPanels2 = new Spry.Widget.TabbedPanels("TabbedPanels2"…
    //-->
    </script>
    <script type="text/javascript">
    <!--
    //-->
    </script>
    <script type="text/javascript">
    <!--
    var TabbedPanels4 = new Spry.Widget.TabbedPanels("TabbedPanels4"…
    //-->
    </script>
    thank you
    Alejandra

    im sorry, i dont understand what you mean. i am using the tabbed panels spry and not the accordion.  i am just a rookie with html coding. can you please explain me what do i need to do?
    thank you very much
    Alejandra

  • Spry 1.6.1 tab widget doesnt work on any browser

    hello
    from dreamwaever CS4 > spry 1.6.1 tab widget doesnt work
    on any browser. i guess the framework need to be fixed as some file
    might hv been wrongly packed.

    Fix your markup issues:
    http://validator.w3.org/check?uri=http%3A%2F%2Fmeeting.afrinic.net%2Fafrinic-10%2Fagenda2x .htm&charset=(detect+automatically)&doctype=Inline&group=0
    Also, your page gives a javascript error, caused by those
    script blocks:
    <script src="demo1_files/urchin.js"
    type="text/javascript">
    </script>
    <script type="text/javascript">
    _uacct = "UA-1848067-8";
    urchinTracker();
    var TabbedPanels1 = new
    Spry.Widget.TabbedPanels("TabbedPanels1");
    </script>
    demo1_files/urchin.js is missing on your server so doing a
    urchinTracker(); will resolve in an error, and stopping the browser
    from executing JavaScript

Maybe you are looking for

  • How do i use two iCloud accounts on one mac?

    i have been using the cloud without problems on my phone and new imac.  i just purchased a new iphone for my wife and set up a new i cloud account so her phone doesn't have to get my work calendar and contacts.  How can i use both icloud accounts on

  • Compliance Calibrator 4.0: replace whole ruleset on one system with another

    Hi All, We have two R/3 environments (one's at 4.7 the other is 4.6c).  Both are running CC 4.0.  What's the best way to replace the whole SOD ruleset on the 4.6c system with the one from our 4.7 system.  When I say whole ruleset I mean all the risk,

  • Itunes COM SDK C#

    Hi. I want to control burn audio automatic using itunes COM for .net with c#. please help me about source code

  • Will there come a software update for the "older" ipods?

    Hi all, will there come a software (firmware?) update for the new menu of the Ipod Video? I have an Ipod video 60Gb and I'm really happy with it, but I found out that the newest ipods have some extra functionality in menu structure, which enhances th

  • Bdc program with out coding

    Hi All, I want to know how to write a bdc program with out coding... Thank you, Gopi....