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
Typically I import photos from my camera into events, and then I take the best photos from the event and put them into an album named after that "event" To do this quickly, I usually want to see the photo full screen (I just double click on a ph [More]
Dear ALL, While doing GR i come across the following error. Update control of movement type incorrect (entry 101 _ X _ B) where to check for this. please advice me. TIA kogiHi, Is it a GR posting against Stock transport order?. Then go for IMG - MM - [More]
I have used bootcamp assistant to install windows 7 on my brand new iMac.  I used a flash stick to install the Windows OS. When I rebooted the system, the iMac gave me an error message that it couldn't find a bootable disk and it asked for a bootable [More]
I have a page where i accept a starting date and ending date as a parameter its source i set it as preference or application item Now in the other page I calls a jasper report.. so it refers the first page.. I am not able to access the start_date whi [More]
Hi! I use 'utl_file.fopen' in a PL/SQL Package. It works fine with ORACLE 8.1.7 and now with ORALCE 9.2 it breaks. First I have create a directory 'UTL_FILE_TMP' and grant it to the PL/SQL user. At the code 'v_file := utl_file.fopen('UTL_FILE_TMP',v_ [More]
After entering all the mandatory fields in the form and submitting that it throws a error page with START DATE ERRORhi Thanks for giving reply i don't change the code.we are not giving any dates also. i am using oim 9.0.1 and the application server i [More]
Hi, I have scenarion JDBC - XI - RFC. Everything seems to be working till yesterday and suddenly i see an error in the communication channel. In the message monitoring the status is set to waiting and I see nothing in the sxmb_moni. Please see the er [More]
Is there really no way to save and name Webclip widgets? What if you want to keep them, manage them, and share them with friends?Try as I might, there is no way to do this. Yet. --ChristophRead other 2 answers [More]
I am trying to install BW30B with Oracle 9.2 on a Sun Solaris 64bit machine. I am using Exceed to display the installation GUI. I keep getting the error message: Unable to access file <Path>/SAPENV.SH Permission Denied. I am running the install with [More]
I did not like program Office 365 and I want to cancel your subscription and receive a refund.You need to talk to Office 365, whoemever you bought that sub from. This is a user to user forum, so no one here can really help you. Did you get the sub th [More]