Spry Accordion letztes Panel speichern
Hi,
ich habe auf der Seite www.hittfeld-sharks.de das Spry Accordion verwendet.
Wenn man sich dort allerdings links durch die Mannschaften klickt ist es ziemlich nervig, dass sich immer wieder das defaultPanel öffnet. Kann man das umstellen, dass sich "beim ersten Öffnen" das default Panel öffnet, aber dann immer das, welches als letztes offen war ?
Greets
PHP, being a serverside code, will refresh the page each time there is a request made to the server. JavaScript (and Spry), being a client side code, does not have to send requests to the server and therefore allows you to change the data without a page refresh.
Having said that, you need to have a Spry dataset in your Accordion panel.
By following these steps, you will be well on your way to achieving what you want.
Retrieve your data using PHP and place it in an HTML-table or similar outside of the Accordion panel
Create a SpryHTMLDataSet based on the HTML-table
Use the data from the Spry dataset to create a master/detail region in your Accordion panel
Just a few questions before I go into details.
Have you set up a connection to a database, thus be able to retrieve the data?
Why do you need an Accordion panel to show your data?
Have you got an online URL so that we can follow your code? Otherwise please include your code in your post.
Please come back here with your answers and we shall try to help you on your way
Ben
Similar Messages
-
Spry Accordion default panel in Master Detail Page
Hi everyone,
First time post and need a little help.
I created a SQL database and put the recordsets in a spry accordion panel as the master section. I have another spry accordion that is my detail section. When I open up the panels in the master section and click on any of the records, it updates the detail region just fine. I did this by passing the record set using php which I don't know, to the detail region. So far, great.
What I now need to do is when I open a panel, I want that panel to stay open. This dosen't seem to work regardless what I do. I believe that in passing the recordset set between the two regions, it is refreshing the page. I tried using code to pass the panel number too but this is not working.
Here is the an example of one of the panels.
<div class="AccordionPanel">
<div class="AccordionPanelTab"><h3>Doctor Who</h3></div>
<div class="AccordionPanelContent">
<table width="385" border="0" class="AccordionPanel" id="content1">
<?php do { ?>
<tr>
<td >
<a id="content1" href="?recordID=<?php echo $row_Doctor_Who['prod_key_name']; ?>&panel=1"; > <?php echo $row_Doctor_Who['video_name']; ?></a>
</td>
</tr>
<?php } while ($row_Doctor_Who = mysql_fetch_assoc($Doctor_Who)); ?>
</table>
</div>
</div>
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1", {defaultPanel: params.panel ? params.panel: 0, useFixedPanelHeights: false});
-->
</script>
If someone can give me some pointers that would be great. I was also thinking of redoing my menus so when a user clicks on an entry, it will open up another page with that panel open or even going to another section of the same page. I'm not a php programmer and taken a beginners class in HTML and Javascript so if you can keep things simple that would be great.
Thanks soo much for helping out if you can!PHP, being a serverside code, will refresh the page each time there is a request made to the server. JavaScript (and Spry), being a client side code, does not have to send requests to the server and therefore allows you to change the data without a page refresh.
Having said that, you need to have a Spry dataset in your Accordion panel.
By following these steps, you will be well on your way to achieving what you want.
Retrieve your data using PHP and place it in an HTML-table or similar outside of the Accordion panel
Create a SpryHTMLDataSet based on the HTML-table
Use the data from the Spry dataset to create a master/detail region in your Accordion panel
Just a few questions before I go into details.
Have you set up a connection to a database, thus be able to retrieve the data?
Why do you need an Accordion panel to show your data?
Have you got an online URL so that we can follow your code? Otherwise please include your code in your post.
Please come back here with your answers and we shall try to help you on your way
Ben -
Spry Accordion Different Panel Heights
I'm building a Spry Accordion Widget as a left nav menu with
25 different panels. Some of my panels contain 10 different links
and others contain only 1 single link. Therefore I would like to
adjust the height of each panel individually according to the
number of links they contain, so I don't end up with huge white
spaces in panels that contain fewer links. My initial idea, in
addition to the .AccordionPanelContent class was to add an "id" to
each panel and control each panels height through CSS. But for some
reason I haven't been successful that way. It looks like all panels
tend to take the height of the first panel, regardless of their
individual set heights. I wonder if I can resolve my problem
uniquely with CSS, or I do I have to go and change something in the
SpryAccordion.js file.
Thanks.Hi Donald, I inserted <script type="text/javascript">
var acc1 = new Spry.Widget.Accordion("Acc1", {
useFixedPanelHeights: false });
</script> into my code. It's almost there, but not
quite. I can see that it is trying to re-ajust the panels' height,
but for panels that have a larger content it tends to show the
whole panel's content and then hides the half of it. Also for
panels with fewer content it doesn't seem to have an effect at all.
I don't know if I have to fix something in the CSS or place the
Acc1 ID in a different location within my accordion HTML code.
Thank you.
Here's the URL I'm working on if you want to take a look.
http://64.49.218.100/product_p/00-120-0ll.htm -
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 -
Guys
New to Spry Accordion. At the moment I've managed to
configure the .js file to make the panels automatically closed on
start-up. They open fine when clicked, but a second click on the
headers won't then close the panel - it only closes on selection of
the next panel.
Can anyone (in simple terms!!) advise where I'm going wrong?
Thanks in advance.
Stevehttp://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html
This feature is only supported when using variable height
panels, so you must pass a false into the Accordion's constructor
for the
"useFixedPanelHeights" constructor option, and a -1 for the
"defaultPanel" option:
<script type="text/javascript">
var acc1 = new Spry.Widget.Accordion("Acc1", {
useFixedPanelHeights: false, defaultPanel: -1 });
</script>
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com
"Centaurus18" <[email protected]> wrote in
message news:fvktgv$77t$[email protected]..
> Guys
>
> New to Spry Accordion. At the moment I've managed to
configure the .js file
> to make the panels automatically closed on start-up.
They open fine when
> clicked, but a second click on the headers won't then
close the panel - it only
> closes on selection of the next panel.
>
> Can anyone (in simple terms!!) advise where I'm going
wrong?
>
> Thanks in advance.
>
> Steve
> -
I want to set pages of a website so certain panels are
already open as the default tab when a visitor selects the page.
I have pasted this text after the existing script at the end
of my document:
<script type="text/javascript">
var acc8 = new Spry.Widget.Accordion("Accordion1", {
defaultPanel: 2 });
</script>
Which ought to open panel 3 when the page loads but is
doesn't open ANY panels! all it does is indicate the tab as
'selected' If I change the defaultPanel: to read 0 it correctly
opens the top panel, but refuses to work for any other panels.
Here is the site where the script should work:
http://www.copenhagencandles.co.uk/new/
Clicking on any of the links in the accordian takes you to
the correct page, but each time the accordian displays
closed!This is the URL
/est_help.htm?tab=2&acc3=2
and this is the markup
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet">
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet">
<script src="SpryAssets/SpryTabbedPanels.js"></script>
<script src="SpryAssets/SpryAccordion.js"></script>
<script src="SpryAssets/SpryURLUtils.js"></script>
<script> var params = Spry.Utils.getLocationParamsAsObject(); </script>
</head>
<body>
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0">Tab 1</li>
<li class="TabbedPanelsTab" tabindex="0">Tab 2</li>
<li class="TabbedPanelsTab" tabindex="0">Tab 3</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 1.1</div>
<div class="AccordionPanelContent">Content 1.1</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 1.2</div>
<div class="AccordionPanelContent">Content 1.2</div>
</div>
</div>
</div>
<div class="TabbedPanelsContent">
<div id="Accordion2" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 2.1</div>
<div class="AccordionPanelContent">Content 2.1</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 2.2</div>
<div class="AccordionPanelContent">Content 2.2</div>
</div>
</div>
</div>
<div class="TabbedPanelsContent">
<div id="Accordion3" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 3.1</div>
<div class="AccordionPanelContent">Content 3.1</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 3.2</div>
<div class="AccordionPanelContent">Content 3.2</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 3.3</div>
<div class="AccordionPanelContent">Content 3.3</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab: params.tab ? params.tab : 0});
var Accordion1 = new Spry.Widget.Accordion("Accordion1", {defaultPanel: params.acc1 ? params.acc1: 0});
var Accordion2 = new Spry.Widget.Accordion("Accordion2", {defaultPanel: params.acc2 ? params.acc2: 0});
var Accordion3 = new Spry.Widget.Accordion("Accordion3", {defaultPanel: params.acc3 ? params.acc3: 0});
</script>
</body>
</html> -
Hello,
is there a way, that if I have a page without the accordion, and I click on that page a link, that link goes to the accordion panel page, and when it goes, specifically opens one of the pannels.
THank youYes. But you need the SpryURLUtils.js files. And you won't find them on Adobe Labs anymore because Adobe abandoned Spry last year. The files have been moved to GitHub.
Tutorial:
http://foundationphp.com/tutorials/spry_url_utils.php
Spry Files:
Adobe GitHub account
Nancy O. -
How to make Spry Accordion Content Panel with a variable content fit
I have a problem. The content panel has a fixed length so I changed it to auto so I can view all the content of each panel. The problem is that the content panel takes the dimensions of the longest content and applies that to ALL the panels. So as you click from one to the other, some are practically empty with all the space, while others seem full.
The question is, is there a way to vary the size of the content panel so on one that has not a lot of content stays to that size. This is the way I have the CSS for that. How can I achieve the variable heights?
.AccordionPanelContent {
overflow: auto;
margin: 0px;
padding: 5px 4px 6px 15px;
height: auto;
background: url(../images/backgrcolor0033.png);
color: #FFF;
Thank you.<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 1</div>
<div class="AccordionPanelContent">Content 1</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 2</div>
<div class="AccordionPanelContent">Content 2</div>
</div>
</div>
<script type="text/javascript">
var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false });</script>
</body>
</html>
Gramps -
Spry Accordion- all panels closed by default
1) Can I have an accordion so that none of the panels are open by default?
2) Changing the height of the panels: Can it be set determined by the amount of content inb a panel? I have 5 panels, and each is populated with data from a database. some may need much more room than others.
Thx,You can add it immediately after the Accordion if you want to - but then you end up with scripts scattered throughout your page(s).
Most of the time I see it added to the bottom of the page. I also do this as I've had several SPRY Elements doing stuff at one time and you can simply combine them into a single list.
Add adri_grace's Code in a Script Tag to the same page that the Accordion is located on.
At the very bottom - just before the Closing for the BODY and HTML Tags.
So you end up with something like:
<script>
var Accordion1 = new Spry.Widget.Accordion("Accordion1",.....
.....{ useFixedPanelHeights: false, defaultPanel: -1 });
var Accordion2 = new Spry.Widget.Accordion("Accordion2",.....
.....{ useFixedPanelHeights: true, defaultPanel: 3 });
var Accordion3 = new Spry.Widget.Accordion("Accordion3",.....
.....{useFixedPanelHeights:false, enableAnimation:false});
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1",.....
.....{defaultTab:7});
</script>
</body>
</html>
Go here:
http://labs.adobe.com/technologies/spry/samples/
Click on the Widgets Tab.
*the dots for each example above are for continuity in the word-wrap - don't include in code. -
Spry Accordion Navigation Panel Behavior in Dreamweaver eLearning Template
I am trying to create an eLearning course using the "SoftSkills" eLearning Template provided by Dreamweaver. I have created several extra div tags to set up extra titles on the tabbed accordion, however, regardless of how I set the variable "AccOpenPanel" here:
<!-- TemplateParam name="accOpenPanel" type="number" value="0" -->
all of the panels are displaying as open. I would like to have panel 2 open and all others closer. I'm sure there's a simple fix for this, but I can't find it. Actually I can't find any help for using this template, which I'm sure exists. Any suggestions? Below is a sample of my accordion code:
<div id="sidebar">
<h1>Table of Contents</h1>
<div class="contentArea">
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Welcome</div>
<div class="AccordionPanelContent">
<ul>
<!-- Add the .current class to the <a> tag for the current page -->
<li><a href="../index.html">Introduction</a></li>
<li><a href="../organization.html">Organization</a></li>
</ul>
</div>
</div>
<div id="Accordion2" class="Accordion" tabindex="1">
<div class="AccordionPanel">
<div class="AccordionPanelTab">4</div>
<div class="AccordionPanelContent">
<ul>
<li><a href="../s1_001.html" class="current">Process Presentation</a></li>
<li><a href="../s1_002.html">Scenario 1</a></li>
<li><a href="../s1_003.html">Additional Information</a></li>
<li><a href="../s1_004.html">Scenario 2</a></li>
<li><a href="../s1_005.html">Self-check</a></li>
</ul>
</div>
</div>
</div>
<div id="Accordion3" class="Accordion" tabindex="2">
<div class="AccordionPanel">
<div class="AccordionPanelTab">2</div>
<div class="AccordionPanelContent">
<ul>
<li><a href="../s2_001.html">Introduction</a></li>
<li><a href="../s2_002.html">Real Life Video</a></li>
<li><a href="../s2_003.html">Key Points</a></li>
<li><a href="../s2_004.html">Interactive Presentation</a></li>
<li><a href="../s2_005.html">Self-check</a></li>
</ul>
</div>
</div>
</div>
<div id="Accordion4" class="Accordion" tabindex="3">
<div class="AccordionPanel">
<div class="AccordionPanelTab">3</div>
<div class="AccordionPanelContent">
<ul>
<li><a href="../s3_001.html">Introduction</a></li>
<li><a href="../s3_002.html">Real Life Video</a></li>
<li><a href="../s3_003.html">Key Points</a></li>
<li><a href="../s3_004.html">Interactive Presentation</a></li>
<li><a href="../s3_005.html">Self-check</a></li>
</ul>
</div>
</div>
</div>
<div id="Accordion5" class="Accordion" tabindex="4">
<div class="AccordionPanel">
<div class="AccordionPanelTab">4</div>
<div class="AccordionPanelContent">
<ul>
<li><a href="../s4_001.html">Introduction</a></li>
<li><a href="../s4_002.html">Real Life Video</a></li>
<li><a href="../s4_003.html">Key Points</a></li>
<li><a href="../s4_004.html">Interactive Presentation</a></li>
<li><a href="../s4_005.html">Self-check</a></li>
</ul>
</div>
</div>
</div>The code that you have shown is not the problem, despite my wondering why you have created a new accordion for each panel. Also you have not shown the links to the support files (JS and CSS) nor have you shown the constructor for each of the accordions, but I assume that you have attended to these matters and did not think it worthwhile to show the code.
Personally, I would have created one accordion with four panels, but this is a matter of choice.
Gramps -
Spry Accordions, Tabbed Panels, and Collapsible Panels: changing colors
I wanted to alert everyone to a great new Community article published by our very own David Powers. The article details the various best practices and methods for changing the colors of Accordion, Tabbed Panels, and Collapsible Panels widgets, including tab backgrounds, borders, and so on.
Here's the article:
http://kb2.adobe.com/community/publishing/504/cpsid_50437.html
Customization questions are pretty frequent in both the Spry and Dreamweaver forums. This new styling guide is sure to answer lots of peoples' questions.
Furthermore, the appearance of such an article is a great example of how Community content can interact and live symbiotically with Adobe Help. We've linked directly to David's piece from our own customization pages for the Spry Accordion, Tabbed Panels, and Collapsible Panels widgets:
Customize the Accordion widget
Customize the Tabbed Panels widget
Customize the Collapsible Panels widget
Thanks a lot to David for hammering out this article.
If you're interested in publishing Community articles of your own, you can download the Community Publishing AIR application and get right to work!The borders you see, are called outline, its a accesiblity feature of the browsers,
Actually called 'focus' lines :-)
Here's an article about the Bluefocus lines seen in Safari.
http://www.brunobergher.com/blog/2009/01/19/safaris-blue-focus-lines/
Without creating a Spry widget myself right now to test, but I'm sure thata there is a 'focus' rule in the css...
trying the
{outline:none;}
on that rule. -
How can I make the spry accordion remember the panel open
when I refresh the page or jump to a new page?
I am using the accordion feature on all my pages as a
navigation aid. It has three panels. When you refresh the page the
panel goes back to the default pane... Is there a way of
controlling this so that the browser can remember the pane that is
open (say set a variable, cookie, other?)Look for "Set the default open panel" on the following page:
http://labs.adobe.com/technologies/spry/articles/accordion_overview/index.html
Keep in mind you would need to change that bit of code on
every page. The only way to do it more dynamically would be to
include a custom javascript or PHP/ASP style script in order to
change the value. -
.js update of spry accordion panel tab data for countdown functionality
Hi,
First off I must say I really love the work done on CS3 and
the Spry Framework - loads of examples and nicely implemented!
Questions in a nutshell:
Can I change spry generated data on the fly so I can run a
.js counter function to dynamically update accordion panel data?
What event do I look for to fire a .js init function to see my new
spry widget (onPostLoad isn't working for me, but I'm a newbie!)?
* spry accordion
* {expire} dataset data is SQL DATETIME
* js countdown function CD_Init() searches DOM for specific
element IDs 'countdownN' and uses innerHTML to update counter at
specific interval
* observer onPostLoad seems to be calling CD_Init before
accordion DOM is loaded.
Verbose questions:
I am trying to tweek the output of a Spry Acoordion and
wanted to add a third party js counter to my accordion panel tab
and am having a bit of difficulty. The js code uses an innerHTML
statement to keep the counter going and supports multiple counters
(which I need to use one counter per tab). I build the multiple
counter id from the ds_RowID field which is where the parent div
element where the js changes the innerHTML. Can I do this? The .js
searches for elements w/ an ID of "countdownN", N = instance # and
a date format of '2007-09-08 00:00:00 GMT+00:00' and updates the
div's text with the countdown time. My {expire} record below is an
SQL DATETIME which is the correct format for this countdown.js
function (with the GMT-05:00 appended).
The relavant code is:
<div id="specialDisplay" spry:region="dsSpecials">
<h3>Click on a special below from our <em>LIVE
FEED</em> to see all the up-to-the-moment
exciting packages available!</h3>
<div id="AccordionSpecials" class="Accordion">
<div class="AccordionPanel" spry:repeat="dsSpecials">
<div class="AccordionPanelTab"
onclick="dsSpecials.setCurrentRowNumber('{dsSpecials::ds_RowID}')"
spry:hover="AccordionPanelLabelHover"><?php echo '<div
id="countdown' .'{ds_RowID}'. '">';?>{expire}
GMT-05:00</div>{dsSpecials::name}</div> <!--
accordion panel tab -->
<div class="AccordionPanelContent">
<div spry:state="loading"><img
src="./i/ajax-loader.gif"/></div> <!-- loading -->
<div spry:state="error"><span spry:content="Error
loading data..."></span></div> <!-- error -->
<div id="details" spry:state="ready"
spry:content="{detail}"></div> <!-- detail when ready
-->
</div> <!--accordion panel content -->
</div> <!-- accordion panel -->
<script type="text/javascript">
<!--
var AccordionSpecials = new
Spry.Widget.Accordion("AccordionSpecials", { defaultPanel: 0,
duration: 1000, useFixedPanelHeights: false, enableAnimation:true }
var observer = { onPostLoad: function(notifier, data) {
CD_Init() ; /*alert("postLoad"); */} };
//specialDisplay dsSpecials.addObserver(observer);
Spry.Data.Region.addObserver("specialDisplay", observer);
//-->
</script>
</div> <!-- accordion -->
</div> <!-- specialDisplay -->
I got the nice countdown.js script from
http://andrewu.co.uk/clj/countdown/
which allows N # of counters/page. I have updated this code to
start checking for a zero based index that I generate utilizing the
spry ds_RowID.
I have added an observer to run the countdown's
initialization function (to hopefully find all the "countdownN"
element instances) under my dataset declarations:
var observer = { onPostUpdate: function(notifier, data) {
CD_Init() ; } };
Spry.Data.Region.addObserver("AccordionSpecials", observer);
Also tried to add the observer to a div surrounding the
according w/ the "spry:region" specified.
But, alas, I see the correct expire instance in my tab, but
it looks like the counter is only firing before the actual data is
loaded (i.e. I used FF's webdeveloper and set a break on the
CD_Init function and it's breaking before the actual accordion is
there - I see the dataset placeholders in my window for the
accordion. When I continue, the accordion is generated, but my
countdown isn't working because it looks to be firing before the
DOM is updated w/ the accordion elements.
Sorry for the long speil; I'm really a .js neophyte and just
starting w/ spry - so I'm not even sure if I can/should change the
HTML generated from spry. If not, is there anyway that I can have a
countdown timer for each accordion's tab panel's associated
{expire} data field? Any ideas and suggestions are greatly
appreciated!!
Thank you also for this forum - some great gems for
development here!Sorry - the previous post is way too long.
Is it possible to tie in a javascript update function (a
counter update) to an element generated by a spry widget (a dataset
value that generates spry accordion tab text) so that the accordion
tab gets updated by the javascript function running under a
setinterval?
I've tried firing the javascript init function with an
observer on the accordion's onPostUpdate event, but it's getting
fired before the spry data is loaded. Is this something that's
possible? Sorry for my lack of javascript expertise! Relying on the
real experts here!
Thanks for any advice/pointers. -
Spry Accordion Panels view incorrect in IE8
I have a page set up using both spry menu and spry accordion panels. The problem is that in FireFox and Chrome, the pages view as they should. However, in IE, the panels on the accordion spread and are open, it doesn't view as it should. The test page is here www.sbcvote.us/index1.html the source code is below. My initial guess is that I have an open or not closed tag somewhere?
<!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>Joe Paul Gonzalez San Benito County Clerk-Auditor-Recorder-Registrar of Voters</title>
<meta name="keywords" content="Joe Paul Gonzalez, San Benito County, Clerk, Auditor, Recorder, Registrar of Voters, fppc form 460, reconveyance deed, deed of reconveyance, reconveyance, homepage, mechanics lien release, quit claim deed form, release of mechinics lien, form, san, reconveyance, county, deed, 460, california, fppc, nacimiento, trust, elections, ca, solictud, certifacadas, reporting, statements, nominees, handbook, contribution, joe, paul, gonzalez" />
<meta name="description" content="Joe Paul Gonzalez San Benito County Clerk-Auditor-Recorder-Registrar of Voters" />
<link href="scripts/style.css" rel="stylesheet" type="text/css" />
<script src="/SpryAssets/menu/SpryMenuBar.js" type="text/javascript"></script>
<script src="/SpryAssets/accordion/SpryAccordion.js" type="text/javascript"></script>
<link href="/SpryAssets/menu/SpryMenuBarHorizontal_sbcvote.css" rel="stylesheet" type="text/css" />
<link href="/SpryAssets/accordion/SpryAccordion_sbcvote.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
function clearText(field)
if (field.defaultValue == field.value) field.value = '';
else if (field.value == '') field.value = field.defaultValue;
</script>
</head>
<body>
<div id="wrapper">
<div id="header"><!-- end of site_title -->
<div id="header_right">
<ul id="header_button">
<li><a href="#"><img src="images/home.jpg" alt="home" /></a></li>
<li><a href="#"><img src="images/contact.jpg" alt="contact us" /></a></li>
</ul>
<div class="cleaner"></div>
<form action="#" method="get">
<input type="text" value="Enter a keyword here..." name="q" size="10" id="searchfield" title="searchfield" onfocus="clearText(this)" onblur="clearText(this)" />
<input type="submit" name="Search" value="" alt="Search" id="searchbutton" title="Search" />
</form>
</div>
</div> <!-- end of header -->
<div id="banner">
<div id="banner_box">
<ul>
<li><a href="clerk.htm" ><span class="current"></span><img src="images/countyClerk.jpg" alt="San Benito County Clerk" /></a></li>
<li><a href="auditor.htm"><span></span><img src="images/countyAuditor.jpg" alt="San Benito County Auditor" /></a></li>
<li><a href="recorder.htm"><span></span><img src="images/countyRecorder.jpg" alt="San Benito County Recorder" /></a></li>
<li><a href="http://results.sbcvote.us" target="_new"><span></span><img src="images/coRegistrar_results.jpg" alt="" /></a></li>
</ul>
</div>
</div> <!-- end of banner -->
<div id="menu">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href="index.html">Home</a>
<ul>
<li><a href="#">Item 1.1</a></li>
<li><a href="#">Item 1.2</a></li>
<li><a href="#">Item 1.3</a></li>
</ul>
</li>
<li><a href="registrar/candidateinfo.htm" class="MenuBarItemSubmenu">Candidate Info</a>
<ul>
<li><a href="candidate_forms_manuals.htm">Forms & Manuals</a></li>
<li><a href="pdf/forms/registrar/candidates/2010CandidateHandbook.pdf">2010 Candidate Handbook</a></li>
<li><a href="registrar/form460.htm" class="MenuBarItemSubmenu">FPPC 460s</a>
<ul>
<li><a href="registrar/form460_all.htm">Candidate Form 460s</a></li>
<li><a href="registrar/2010_form460.htm">2010 Candidate 460 Forms</a></li>
<li><a href="registrar/2009_form460.htm">2009 Candidate 460 Form</a></li>
<li><a href="registrar/2008_form460.htm">2008 Candidate 460 Form</a></li>
<li><a href="registrar/2007_form460.htm">2007 Candidate 460 Form</a></li>
</ul>
</li>
<li><a href="candidate_reporting.htm">Reporting</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="registrar/votebymail.htm">Vote-By-Mail</a>
<ul>
<li><a class="MenuBarItemSubmenu" href="overseasvoting.htm">Overseas Voting</a>
<ul>
<li><a href="pdf/forms/registrar/votebymail/oversees_votebymail_request.pdf">Overseas Vote-By-Mail Request</a></li>
<li><a href="pdf/forms/registrar/votebymail/guide_military_overseas.pdf">Guide Military Overseas</a></li>
<li><a href="#">Untitled Item</a></li>
</ul>
</li>
<li><a href="mailvotestatus.htm">Ballot Status</a></li>
<li><a href="pdf/forms/registrar/votebymail/votebymail_app_gen_eng.pdf">Application </a></li>
<li><a href="pdf/forms/registrar/votebymail/votebymail_app_gen_SPAN.pdf"> Español</a></li>
</ul>
</li>
<li><a href="/registrar/registration.htm" class="MenuBarItemSubmenu">Register to Vote</a>
<ul>
<li><a href="registrar/national_vrc_notice.htm">Form English</a></li>
<li><a href="http://www.sbcvote.us/registrar/national_vrc_notice_sp.htm">Español</a></li>
<li><a href="registrar/statement_distribution.htm">Distribution</a></li>
</ul>
</li>
<li><a href="registrar/pollworker.htm" class="MenuBarItemSubmenu">Pollworker</a>
<ul>
<li><a href="registrar/pollworker.htm">Become a Pollworker</a></li>
<li><a href="registrar/pollworker.htm#student">Students</a></li>
<li><a href="registrar/pollworker.htm#student">State Employees</a></li>
</ul>
</li>
<li><a href="registrar/hava_faqs.htm" class="MenuBarItemSubmenu">HAVA</a>
<ul>
<li><a href="registrar/hava_complaint_procedure.htm">Complaint Procedure</a></li>
<li><a href="registrar/hava_compliancemanual.htm">Compliance Manual</a></li>
</ul>
</li>
</ul>
</div> <!-- end of menu -->
<div id="content_wrapper">
<div id="left_sidebar">
<div class="box">
<h2><span></span>Click on a Tab for Info</h2>
<div class="body">
<ul class="side_menu">
<li>
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Vote-By-Mail (VBM)</div>
<div class="AccordionPanelContent"><a href="/registrar/votebymail.htm">Vote-By-Mail Voting</a><a href="/pdf/forms/registrar/votebymail/overseas_votebymail_request.pdf">Overseas VBM Request</a>
<a href="/pdf/forms/registrar/votebymail/VBM_Application.pdf">Application for Permanent VBM </a><a href="/pdf/forms/registrar/votebymail/guide_military_overseas.pdf">Guide to Military Voting</a>
<a href="/pdf/forms/registrar/votebymail/votebymail_app_general_county_fill.pdf">Application VBM General Election</a><a href="/registrar/mailvotestatus.htm">Did My VBM Ballot Get Counted?</a><br />
<br />
<br />
</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Voto Por Correo</div>
<div class="AccordionPanelContent"><a href="/registrar/spanish/voto.por.correro.html">Voto Por Correro</a><a href="/registrar/spanish/overseasvoting.SPAN.html">Votante Información Extranjero</a><a href="/registrar/mailvotestatus.htm">Cheque se recibimos su voto por correro</a> <a href="/pdf/forms/registrar/votebymail/VBM_ApplicationSPAN.pdf">Solicitud de Balota de Votación por correo en California</a></div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Voter Information</div>
<div class="AccordionPanelContent"> <a href="/registrar/national_vrc_notice.htm">Register to Vote</a>
<a href="http://www.voterguide.sos.ca.gov/pdf/english/" target="_new">Voter Information Guide Nov 2010</a>
<a href="/pdf/forms/registrar/register/YourRightToVote_ENG.pdf">Your Right to Vote</a> <a href="/pdf/forms/registrar/register/eng-list-of-certified-candidates11.10.pdf">Certified Candidates Nov 2010</a>
<a href="/pdf/forms/registrar/register/TimeOfftoVote_ENG.pdf">Time Off to Vote </a><br />
<br />
</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Votante Información</div>
<div class="AccordionPanelContent"> <a href="/pdf/forms/registrar/register/Guide_Voting_SPAN.pdf" target="_new">Guía para Votar</a> <a href="/registrar/national_vrc_notice_sp.htm">Inscíibase para Votar</a> <a href="/pdf/forms/registrar/register/Voter-bill-of-rights.SPAN.pdf">Declaración derechos de Votantes</a> <a href="/pdf/forms/registrar/register/spanish-vig-nov-2010.pdf">Guía Oficial Información Nov 2010</a> <a href="/pdf/forms/registrar/register/spanish-list-of-certified-candidates11.10.pdf">Lista Candaditos Certificados 2010 </a><a href="/pdf/forms/registrar/register/TimeOfftoVote_SPAN.pdf">Tiempo Libre Para Votar</a></div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">For the Candidates</div>
<div class="AccordionPanelContent">Blank 460 Forms<br />
Candidates 460 Forms Index<br />
2010 Candidate Handbook<br />
2010 Calendar </div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Nov 2, 2010 Election</div>
<div class="AccordionPanelContent">Election Results Page<br />
Canvass of the Vote
<br />
Vote-By-Mail Ballot Look up<br />
State Vote Pamphlet<br />
Sample Ballot Statewide
</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 7</div>
<div class="AccordionPanelContent">Content 7</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 8</div>
<div class="AccordionPanelContent">Content 8</div>
</div>
</div>
</li>
<li> <a href="#">Lorem ipsum dolor</a></li>
<li><a href="#">Donec bibendum semper</a></li>
<li><a href="#">Proin tincidunt dapibus</a></li>
<li><a href="#">Nulla consequat</a></li>
<li><a href="#">In enim justo</a></li>
<li><a href="#">Aenean vulputate</a></li>
<li><a href="#">Etiam ultricies</a></li>
<li><a href="#">Nullam vehicula egestas </a></li>
</ul>
</div>
<div class="box_bottom"><span></span></div>
</div>
<div class="box">
<h2><span></span>Our Departments</h2>
<div class="body">
<ul class="side_menu">
<li><a href="clerk.html">County Clerk</a></li>
<li><a href="auditor.html">County Auditor</a></li>
<li><a href="recorder.html">County Recorder</a></li>
<li><a href="index.html">Registrar of Voters</a></li>
<li><a href="http://results.sbcvote.us" target="_new">Election Results</a></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<div class="box_bottom"><span></span></div>
</div>
</div> <!-- end of left_sidebar -->
<div id="content">
<div class="box">
<h2><span></span>Welcome to the San Benito County Registrar of Voters</h2>
<div class="body">
<p> Welcome to our new and updated website for the County of San Benito Clerk-Auditor-Recorder- Registrar of Voters. </p>
</div>
<div class="box_bottom"><span></span></div>
</div>
<div class="box">
<h2><span></span>News and Updates</h2>
<div class="body">
<div class="news_box">
<h3><a href="http://results.sbcvote.us" target="_new">November 2, 2010 Election Results</a></h3>
<p>Up to the minute election results for San Benito County will be uploaded to our website at the close of the polls on Tuesday, November 2, 2010 at<a href="http://results.sbcvote.us" target="_new"> http://results.sbcvote.us.</a></p>
<div class="cleaner"></div>
</div>
<div class="news_box">
<h3><a href="registrar/mailvotestatus.htm">Vote-By-Mail Ballots</a>
</h3>
<p>Verify that your Vote-By-Mail Ballot has been received <a href="/registrar/mailvotestatus.htm">here.</a> To insure that your vote is counted, drop off your VBM ballot to our offices on the second floor of the courthouse building room 406 BEFORE Tuesday, Nov. 2, 2010.</p>
<div class="cleaner"></div>
</div>
<div class="news_box">
<a href="#"><img class="news_image" src="images/image_08.jpg" alt="image" /></a>
<h3><a href="#">Auditor's Department</a></h3>
<p> Praesent rhoncus faucibus nibh, non molestie lectus sagittis sed. Praesent ac sem lectus. Cras molestie elit sit amet velit tincidunt imperdiet. Mauris nulla purus.</p>
<div class="cleaner"></div>
</div>
<div class="more float_r"><a href="#">View All</a></div>
<div class="cleaner"></div>
</div>
<div class="box_bottom"><span></span></div>
</div>
</div> <!-- end of content -->
<div id="right_sidebar">
<div class="box">
<h2 align="center"><span></span>Joe Paul Gonzalez</h2>
<div class="body">
<ul class="side_menu">
<li></li>
<li></li>
<li><img src="images/joepaul_new.jpg" width="207" height="262" alt="joe paul gonzalez" /></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li><a href="#">County Clerk-Auditor-Recorder</a></li>
</ul>
</div>
<div class="box_bottom"><span></span></div>
</div>
<div class="sidebar_box">
<a href="http://results.sbcvote.us" target="_new"><img src="images/results.jpg" alt="Election Results" /></a> </div>
<div class="sidebar_box">
<a href="#"><img src="" alt="City Zoo" /></a> </div>
</div> <!-- end of right_sidebar -->
<div class="cleaner"></div>
</div> <!-- end of content_wrapper -->
</div> <!-- end of wrapper -->
<div id="footer_wrapper">
<div id="footer">
<ul class="footer_menu">
<li><a href="#">Homepage</a></li>
<li><a href="#">Site Map</a>
</li>
<li><a href="#">Clerk</a>
</li>
<li><a href="#">Auditor</a></li>
<li><a href="#">Recorder</a></li>
<li><a href="#">Registrar of Voters</a></li>
<li><a href="#">Election Results</a></li>
<li><a href="#">Forms</a></li>
<li class="last_menu"><a href="#">Contact</a></li>
</ul>
Copyright © 2010 <a href="http://www.netwidesales.com" target="_new">NetWideSales</a> |
<a href="http://www.netwidesales.com" target="_new">Designed by Irma C. Gonzalez</a> |
<a href="http://www.joepaulgonzalez.com" target="_new">Joe Paul Gonzalez</a> </div> <!-- end of footer -->
</div> <!-- end of footer_wrapper -->
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"/images/menubar/SpryMenuBarDownHover.gif", imgRight:"/images/menubar/SpryMenuBarRightHover.gif"});
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
</script>
</body>
</html>
I appreciate any help here, it really doesn't make sense to me, it did work for a few viewing in IE and I must have changed something by mistake?
Thanks again.I added a set width to the accordion css and that solved the problem of the widget running across the page. The IE issue appears to be an ongoing issue with IE. If a viewer has IE8, then hitting the compatibility button on the menu bar will solve the viewing problem. If not, it doesn't view correctly. It views fine on other browsers (Chrome, etc). Problem is how many people will know to hit the compatibility button?
Thank you for your help, I appreciate the time taken. -
Spry accordion panel won't open by default
Here is my code for spry accordion, I am trying to open the 1st inside accordion panel by default, i f not by default, as soon as its parent is opened, but none of them seems to work. Please let me know where I am going wrong.
<div class="Accordion" id="mainAccordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab"> <a id="healthCheckAccordion" onClick=""><img align="left" src="/csm/view/include/images/healthicon.gif">Health Check</a></div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab"> <a id="configurationAccordion" onClick="sysAcc.openFirstPanel()"><img align="left" src="/csm/view/include/images/conficon.gif">Configuration</a></div>
<div class="AccordionPanelContent">
<div class="Accordion" id="main2ndAccordion" tabindex="1">
<div class="AccordionPanel">
<div class="AccordionPanelTab"> <a id="systemAccordion" style="color:#ffffff;background-color: #2F5882;">System</a></div>
<div class="AccordionPanelContent">
<a id="kernelParamsAccordion">Kernel Parameters</a><br/>
<a id="diskUsageAccordion">Disk Usage</a><br/>
<a id="fileSystemAccordion">File System Statistics</a><br/>
<a id="osPatchesAccordion">Os Patches</a><br/>
<a id="networkAccordion">Network</a><br/>
<a id="userLimitAccordion">User Limit</a><br/>
<a id="environmentVariablesAccordion">Environment Variables</a><br/>
</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab"> <a id="productName" style="color:#ffffff;background-color: #2F5882;"></a></div>
<div class="AccordionPanelContent">
<a id="odbcAccordion">ODBC</a><br/>
<a id="bitmodeAccordion">Bitmode</a><br/>
<a id="versionAccordion">Version</a><br/>
<a id="licenseInformationAccordion">License Information</a><br/>
<a id="dumpshrAccordion">Dumpshr</a><br/>
<a id="dblistAccordion">DBList</a><br/>
<a id="showtimeAccordion">Showtime</a><br/>
<a id="serverStatusAccordion">Server Status</a><br/>
</div>
</div>
<script type="text/javascript">
var sysAcc = new Spry.Widget.Accordion("main2ndAccordion", {defaultPanel: 0, useFixedPanelHeights: false });
</script>
</div>
</div>
</div>
<script type="text/javascript">
var mainAcc = new Spry.Widget.Accordion("mainAccordion",{ defaultPanel: -1, useFixedPanelHeights: false });
</script>
</div>
Also the System panel, with id="systemAccordion" takes 2 clicks to open, every 1st time the page loads<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet">
<style>
#Accordion2 .AccordionPanelTab {
background-color: #CCCCCC;
color: #FFFFFF;
</style>
</head>
<body>
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab"><img src="/csm/view/include/images/healthicon.gif">Health Check</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab"><img src="/csm/view/include/images/conficon.gif">Configuration</div>
<div class="AccordionPanelContent">
<div id="Accordion2" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">System</div>
<div class="AccordionPanelContent">
<a href="#" id="kernelParamsAccordion">Kernel Parameters</a><br/>
<a href="#" id="diskUsageAccordion">Disk Usage</a><br/>
<a href="#" id="fileSystemAccordion">File System Statistics</a><br/>
<a href="#" id="osPatchesAccordion">Os Patches</a><br/>
<a href="#" id="networkAccordion">Network</a><br/>
<a href="#" id="userLimitAccordion">User Limit</a><br/>
<a href="#" id="environmentVariablesAccordion">Environment Variables</a><br/>
</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Product</div>
<div class="AccordionPanelContent">
<a href="#" id="odbcAccordion">ODBC</a><br/>
<a href="#" id="bitmodeAccordion">Bitmode</a><br/>
<a href="#" id="versionAccordion">Version</a><br/>
<a href="#" id="licenseInformationAccordion">License Information</a><br/>
<a href="#" id="dumpshrAccordion">Dumpshr</a><br/>
<a href="#" id="dblistAccordion">DBList</a><br/>
<a href="#" id="showtimeAccordion">Showtime</a><br/>
<a href="#" id="serverStatusAccordion">Server Status</a><br/>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="SpryAssets/SpryAccordion.js" ></script>
<script>
var Accordion1 = new Spry.Widget.Accordion("Accordion1", {defaultPanel: 1, useFixedPanelHeights:false});
var Accordion2 = new Spry.Widget.Accordion("Accordion2", {defaultPanel: 0, useFixedPanelHeights:false});
</script>
</body>
</html>
Gramps
Maybe you are looking for
-
Why doesn't the iphone 5 have swype?!
I don't understand why the iPhones before the 5 have swype but the 5 itself does not?
-
Hey All... I have a new problem that has just started on my network. All my intel NetportExpress print servers have decided to start printing a blank page between every printed page. I have tried upgrading the firmware, deleting/recreating queue with
-
I have a iPhone4S, MacBook Pro and MacBook Air, all with uptodate systems etc. How can I install iCloud serving all these 3 devices ? No instructions found so far. Thank you. Arnold Robbé
-
Sometimes jack is not working on my Macbook Pro
Hello everyone, i'm having a small issue with my macbook pro 15'' early 2011 version. The issue is with the audio jack port. Sometimes is working sometimes is not. I have check if my headphones or the jack cable of my speakers has been damaged but on
-
A whitepaper named as Oracle Forms Server Troubleshooting tells me a TRCEVAL utility, which can analyse SQL*NET trace file. But I did not found it under my Oracle Developer directory, and can not get results by searching OTN. Anyone can help me to ge