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
When my apps logs in the User by checking that the username and password are correct against the server then there has been a connection opened to perform this task. Then the user is returned to the Main Menu. After that they can send some data to th [More]
Dear Friends,                         while creating reasons for Personnel Actions under spro am getting this error.Kindly help me to solve this error Upd.0000 = 'X' is only allowed for Upd.0302 = 'X' Message no. 54360 Diagnosis The combination you h [More]
after I updated my iphone 4 and both of my ipad 2s to ios 5 and my computer no longer finds them. They used to show up as devices with removable storage, but now they dont show up anymore. does anyone have a fix for this? any help would be appreciate [More]
Since updating to iTunes 10.4 it crashes whenever I'm playing certain media and switch to iTunes (alt-tab). iTunes crashes immediately upon becoming the foreground application. This happens when playing podcasts (some, but not others) and movies as f [More]
Hi. I'm using Oracle 10g , forms 6i, and I need capture picture through webcam. If does anyone have one example , will be nice. I found one exemple but doesn't work. the code... declare numero number; height number; width number; begin -- COMMIT_FORM [More]
Hi there After the disaster of organising my iBooks, I finally thought I had everything working. I have a Macbooks Air and a MASSIVE iTunes Library folder, containing movies, music and (up until recently) Books. Because of this, my iTunes Library is [More]
I recently updated from Reader X to Reader XI. The new program initiates to blank document screen and closes immediately. It will not show new documents and it will not show documents previously viewed by Reader X.  I tried to revert to Reader X and [More]
for some odd reason, my finder always open whenever my OS X starts up. I've been looking for the function to turn it off, but I can't seem to. Anyone can guide me to the right place? ThanksAre you sure with restart? Does it happen when you shut down, [More]
How can I fix this?Try This... Close All Open Apps... Sign Out of your Account... Perform a Reset... Try again... Reset  ( No Data will be Lost ) Press and Hold the Sleep/Wake Button and the Home Button at the Same Time... Wait for the Apple logo to [More]
Hi, I just installed Parallels 7 (and Windows 7 through Parallels) and now when I try to load different Apps (iPhoto, Aperture, iTunes, Delicious Library) I'm getting errors like the one below (From Aperture) Looking for some help to explain this err [More]