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
no longer exist. My ipod could not hold all of the songs that I had on itunes...and after I deleted a playlist, this keeps popping up and i do not know how to fix it.   Windows 2000  You get this problem when the option 'Sync Music - Selected playlis [More]
Cannot install Firefox. When I click on the link on the Mozilla website, it goes to an "error loading page". My network connection and Internet Explorer are fuctioning normally. == computer was recently wiped clean and am now reinstalling all pr [More]
There was a problem with our wi-fi so my dad bought a new router and now i need to reset my ipod touch with the new router address but i can figure out how to reset it on my ipod touch? Any ideas on how to reset it??I reset my WiFi network settings a [More]
I have created an flex mobile app in which I want to save a file in pdf format in an ipad/iphone (any IOS device) but while saving that file its throughing #2038 error. And another thing I don't want to save the pdf file in applicationStorageDirector [More]
hi, i want to install archlinux on a partition on my intel fake raid setup. I am new to fake raid and have noticed that many a Linux distro don't play nicely with it. will arch linux find my existent fake raid setup? will i have to type anything spec [More]
I want to click on a button that will open a web page inside the same web page. How how I do this? Thanks, LThe frame option is to use an inline frame, or <iframe> into which you place a source url, which can be a page on your site or a pdf or a pag [More]
I"m really new at this.  Need to add music to the 3 websites I built.  They are up and running. They were built with CSS & XHTML code. IF I download Flash Player how will I add my music file?  I want my visitors to be able to stop music, and/or p [More]
My new 6600 fold drives me mad! How can I navigate through the diiferent numbers/contacts when I use voice dialing via headset? The idea is: press the button on my headset, then talk a contacts name e.g. "Peter" (with or without thumbs in the no [More]
10 important latest question on hr-abap pleaseSome questions are: Define HR ABAP: What is LDB? Modules of HR ABAP: What is the difference between ABAP and HR-ABAP? What is an Infotype? What is PROVIDE and ENDPROVIDE? What is a macro? Where can u get [More]
Hi all, How to find MATCH count for #  in a String. Ex:  6170#0400-0002-00#API3PT#AL#AUST#DEVE#KG#100.00#100.00#100.00#0.00##10.20 Regards, Balavardhan.K> balavardhan k wrote: > I have used below syntax to find count but it is not returning the valu [More]