Sitemap

Amicuk Programming Answers

Accordion defaultPanel first tab value

2015-10-11   Views:1

Advertisement

I have an application which has an accordion panel and several detailregions. - the accordian panel is dynamically generated in spry with xml (both the tabs and the content) - the detailregions are based on what the current selected tab is in the acc

I have an application which has an accordion panel and
several detailregions.
- the accordian panel is dynamically generated in spry with
xml (both the tabs and the content)
- the detailregions are based on what the current selected
tab is in the accordion panel
I needed to be able to access these tabs via a URL query
string - and have the correct panel / detailregion display based on
the variable passed in the URL.
I have this working correctly.
The problem though, is that the tabs onClick events do not
number correctly when using the defaultPanel attribute.
For example,
var acc = new Spry.Widget.Accordion("test",{defaultPanel:
functionThatGeneratesDefaultPanel});
works correctly for setting the panel which needs to be
displayed, but then if you click on the tabs to navigate to a
different panel, tab one ALWAYS defaults to whatever the
defaultPanel value was instead of being 0. Obviously this disables
the accordion panel from working correctly.
Any suggestions on how I can get around this?
Your assistance is appreciated!
elaine

The replay answer
Advertisement
Thanks for the reply Chris. I have somewhat narrowed down the
problem, but still haven't solved it (had to move on and finish the
rest of the website:)
As I mentioned previously, I am creating these accordion
panels dynamically through xml. Inside one of the panels, there is
a secondary navigation system which is fed by xml as well. The
problem seems to be caused by having two datasets in the same
accordion panel. Here is the code:
var observer = { onPostUpdate: function(notifier, data) { var
acc = new Spry.Widget.Accordion("nav",{defaultPanel:
requestedPanel}); dsNavItems.setCurrentRow(requestedPanel);
displayCoupons(); } };
Spry.Data.Region.addObserver("nav", observer);
and the accordion:
<div id="nav" class="Accordion" spry:region="dsNavItems
dsNavSubs">
<div class="AccordionPanel" spry:repeat="dsNavItems">
<div class="AccordionPanelTab" spry:hover="rowHover"
spry:select="rowSelected"
onclick="clicker({dsNavItems::ds_RowID});">
<h3 spry:if="({ds_RowNumber}) != 2"
onClick="dsNavItems.setCurrentRow('{dsNavItems::ds_RowID}');hideLayer('comingSoon');hideL ayer('coupons');hideLayer('couponLarge');hideLayer('imageHolderScreen');hideLayer('submenu Content');hideLayer('submenu1');showLayer('featureGraphic');showLayer('ticker');showLayer( 'newsBar');"
spry:content="{dsNavItems::name}"></h3>
<!-- for coupons -->
<h3 spry:if="({ds_RowNumber}) == 2"
onClick="dsNavItems.setCurrentRow('{dsNavItems::ds_RowID}');hideLayer('comingSoon');hideL ayer('imageHolderScreen');hideLayer('submenuContent');hideLayer('submenu1');hideLayer('fea tureGraphic');hideLayer('ticker');hideLayer('newsBar');showLayer('coupons');showLayer('cou ponLarge');"
spry:content="{dsNavItems::name}"></h3>
</div>
<div class="AccordionPanelContent">
<div spry:state="loading"><img
src="images/ajax-loader.gif"/></div>
<div spry:state="error"><span spry:content="The
website is currently down. Please try again in a few
minutes."></span></div>
<!-- departments nav -->
<div spry:if="({ds_RowNumber}) == 0"
spry:state="ready">
<div class="department" spry:repeat="dsNavSubs"
onClick="{dsNavSubs::onClick}; goToURL('{dsNavSubs::url}')"
spry:hover="rowHover" spry:select="rowSelected"
spry:content="{dsNavSubs::name}"></div>
</div>
<!-- non-departments items -->
<div spry:if="({ds_RowNumber}) != 0"
spry:state="ready">
<span
spry:content="{dsNavItems::content}"></span>
</div>
</div>
</div>
</div>
This problem can be seen at
http://www.sportzoutdoor.com/index.php?panel=2
This will default to opening the page with the second tab
appearing. Trying clicking on the first tab and you will see that
it tries to refresh, but comes up as the 2nd tab. When running an
echo with this, on the rownumber, it returns as 2 for both the
selected tab and for the first tab. For some reason, it is
assigning 2 to this tab when it generates it.
The problem only occurs when it is selecting a specific panel
from the url query. Otherwise at
http://www.sportzoutdoor.com/index.php
it works fine. Also, this is the page where you can view the
secondary nav system built into the first panel.
Also, in another example - this one without a secondary nav
system, but still with the url query, works fine:
http://www.sportzoutdoor.com/cycling.php?panel=4
Let me know what you think...
thanks,
elaine

Go to See the other 3 answers

Accordion defaultPanel first tab value

Category:DefaultRelease time:2015-10-11Views:130

I have an application which has an accordion panel and several detailregions. - the accordian panel is dynamically generated in spry with xml (both the tabs and the content) - the detailregions are based on what the current selected tab is in the acc[More]

Accordion Interaction: Additional Tabs

Category:DefaultRelease time:-0001-11-30Views:130

I would like to use the Accordion interaction or the Tab interaction. But I need two more tabs.  I have been able to add one.  How can more tabs be added?Hello and welcome, There is a minimum and a maximum number for most interaction buttons. In case[More]

Accordion - no default tab?

Category:DefaultRelease time:-0001-11-30Views:130

DefaultPanel is very nice if you want to open a panel other than 0 on load -- but I want the Accordion closed on load. I tried sending it a -1 but that broke it. Is this possible? Current accordion page: squarehead --sb.quote: We are going to impleme[More]

Embed and Accordion in a Tab Panel

Category:DefaultRelease time:-0001-11-30Views:130

Has anyone tried embedding an accordion widget inside a tabbed panel? I'm running into an issue where the accordion doesn't behave properly. I'm assuming it has something to do with the hierarchy of div tags, but don't know enough yet to be certain.[More]

Accordion defaultPanel problem

Category:DefaultRelease time:-0001-11-30Views:130

Hi Everyone, I'm using Spry Accordion as a menu and im loading the data from an xml file, and that part is working fine :D the problem is if I try to set the defaultPanel to anything else besides "0" like the following <script type="text[More]

Spry accordion - div above Tab - positioning moves wrong ?

Category:DefaultRelease time:-0001-11-30Views:130

Hi, The next point in my site is the text above/in every Tab. The Tab images fades/appears and the text may not fade/appear. So I made a div above the Tab, but of course the text of the second Tab is moving down (becouse the content appears) and is n[More]

Responsive accordion  plugin - Responsive tabs

Category:DefaultRelease time:-0001-11-30Views:130

I tried the plugin using the instructions from the website http://www.jqueryscript.net/layout/Lightweight-jQuery-Responsive-Tabs-Accordion-Plugin-Res ponsive-Tabs.html Now also it doesn't work. Here is my site link http://bhc.edu.in/commerce/StaffPro[More]

Accordion panels - single tab, is that possible?

Category:DefaultRelease time:-0001-11-30Views:130

So I want to use an accordion panel to create something like this: http://www.christianwoo.com/furniture/# Any ideas?Hi Nicole, You can create a single tab accordion panel. Select "Can close all" to achieve the same affect as shown on that site.[More]

Accordion fade/appear stay's after clicking another tab/content

Category:DefaultRelease time:-0001-11-30Views:130

Hi, In the accordion Tab i've putten the effect fade/appear on the image. Problem: When I close the panel by clicking on te accordion Content, the Tab stay's dark. This also stay's dark when I click on another Tab. After clicking on content or anothe[More]

Displaying a Master Detail Relationship in a Panel Accordion or Tabs

Category:DefaultRelease time:2015-10-11Views:130

Hi, Is it possible to display a Master-Detail relationship in a Panel Accordion or Panel Tab or other component that visually divides the display? Say I have a Department - > Employees master detail relationship and I want each tab in my accordion to[More]

Link to specific accordion tab from other page

Category:DefaultRelease time:2015-10-11Views:130

Hi all, were working on a site that has recipes page. there are few recipes and they are all within an accordion widget. when you click on the title ie: Apple pie the tab opens and shows the info. My question is : Is it possible to link to that speci[More]

Hot
For the past week, almost every time I try to open a new tab to go to Twitter.com (or right-click on a link in a tweet), Firefox crashes on me. Today when I tried to go to Twitter, Firefox will only load the Twitter navigation bar and not the rest of [More]
How do I transfer my Acrobat Pro 10 from one computer which dies to my new one.  I have serial number and am original buyer. Thx Jimif you need to reset your activation count, contact adobe support: http://www.adobe.com/support/chat/ivrchat.html if y [More]
Hi Experts, We hv my_SAP_Script in DEV system of FarmSeeds box.................now, I need to get(import/copy) in the same my_SAP_Script into DEV system of FarmChemicals box, So, in this perspective am looking the prog. of RSTXSCRP............but, it [More]
Hi Azure team,I received the below error mail for automated export. "We recommend checking that the storage account is available, and that you can perform a manual export to that account. We will attempt to export again at the next scheduled time.&qu [More]
Hi, I am new to weblogic and i am developing my final year project using weblogic 8.1 SP 3.0. I want to use MS SQL Sever as a database. Can anyone tell me how to configure MS SQL Server for weblogic and how to communicate with it with the help of an [More]
Hey All: Been working with Dreamweaver (CS5) long enough now to realize there are things I can do, and should do.  Now it's time to learn how. My biggest time issue is that I can have the same thing (such as a table or menu) on each page.  So if I ch [More]
adobe application manager was not allowing me to launch photoshop cs6, i am using windows and recently purchased CS6 as a single application from creative cloud, I have been unable to use this product and as a web designer this is costing me both tim [More]
hi iam trying to add a stop button in addition to the play button (i already have), to give the user more control. so they can click play, then stop and if they desire play again (so it starts from the beginning). the music is streamed and i do not h [More]
Hi Friends, i have done workflow for PP, but i need the to trigger work flow for a specific plant only and for specific production order type only. i.e for each plant and order type work flow have to delivered for specific persons ( different persons [More]
Hi! how can I delete a book from the iCloud? I bought the wrong book ... is for adults and I have kids...soThe most comprehensive delete method I know about is to delete the book from iTunes on the computer you sync your iPad with.  You'll be asked i [More]