Set Accordion Default Panel in URL
I am making a function call like this
window.open('events.php?Accordion1.defaultPanel=3',
'_parent')
My goal is for the the user to click a button, go to the
events page (events.php) and automatically open a specific panel in
the accordion widget.. I cannot make the above code work.
Hi Marlene,
First read the following tutorial to understand what you
should do to
achieve what you want.
http://foundationphp.com/tutorials/spry_url_utils.php
If you haven't upgraded your spry version, the link to
download the zip
file
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_spry
it's not working at the moment. If you want it I can email to
you, just
give me an email address or email to V1 Fusion to info [at]
3rd-Eden
[dot] com. He offered to send the file in another thread.
Just let us know it!
Cheers
Marlene escribió:
> I am making a function call like this
> window.open('events.php?Accordion1.defaultPanel=3',
'_parent')
>
> My goal is for the the user to click a button, go to the
events page
> (events.php) and automatically open a specific panel in
the accordion widget..
> I cannot make the above code work.
>
Similar Messages
-
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 -
Accordion Default Panel Based on Date
I created an accordion panel with a Spry dataset consisting of elements relating to an event schedule. By default, I have all content panels closed, but I would like to set the default content panel based on an event's date.
So, if the first event is on September 7, I would like the content panel open for the September 7 event (through the end of that day). On September 8th, I would like the next event's content panel open through that date and so on.
It looks like I'll need to set a javascript date conditional, then loop through the dataset with "addObserver" and have it set the default panel through scripting in the widget javascript.
Anyone have specific insight on how to accomplish this?
Much Thanks,
Colin
Here's my basic code:
<div style="width:622px" id="Acc1" class="Accordion" tabindex="0">
<div spry:repeat="ds1" class="AccordionPanel">
<div class="AccordionPanelTab" >
<div class="rowsched" spry:even="schedeven" spry:odd="schedodd" spry:hover="schedhover">
<ul style="display:inline;padding-left:4px">
<li class="rositem" style="left:13px"><span spry:content="{Date}"></span></li>
<li class="rositem" style="left:155px"><span spry:content="{Opponent}"></span></div> </li>
<li class="rositem" style="left:310px"><span spry:content="{Location}"></span></li>
<li class="rositem" style="left:455px"><span spry:content="{TV}"></span></li>
<li class="rositem" style="left:555px"><span spry:content="{Time}{result}"></span></li>
</ul>
</div>
</div>
<div class="AccordionPanelContent">
<div style="color:#000000"><img src="{icon}" alt="{Opponent}" width="100" height="67" /> Other content goes here</div>
</div>
</div>
<script type="text/javascript">
var acc1 = new Spry.Widget.Accordion("Acc1", { useFixedPanelHeights: false, defaultPanel: -1 });
</script>You should be able to retrieve the value of other valueset using :$FLEX$.<valuesetname> I'm not sure about the exact syntax, it's been a while since i worked with applications.
-
Tagging in MMS and set the default search center url through power shell
Hi,
Would like to know below things are psosiblke through Power Shell.
Check the checkbox from the term store management tool [ for Managed Metadata Serv.]'s navigation section and for the tagging feature.
2) In the search setting section of site collection administration, i need to enter the default search center url, [ i have created search center sub site in al of my site collections.] my site collectons in the farm is more
than 50. so i cant enter the url of search center url [/sites/site1/sc/pages/results.aspx ] manually.can someone pls help...
-
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> -
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 -
Accordion - default panel not working
Hi, I'm using this script so the second panel is open by default, but it's not working (all the panels appear close by default)
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, defaultPanel: 1 });
//-->
</script>
I can't figure out what's wrong.
Here's the live page: http://www.apokrisis.com/client-projects/npfmc2010/public-meetings/committees-related-meet ings.html
Thanks for your help!
MWhittYour code is this
<script type="text/javascript">
<!--
var TabbedPanels1 = new
Spry.Widget.TabbedPanels("TabbedPanels1");
var Accordion1 = new Spry.Widget.Accordion("Accordion1", {
useFixedPanelHeights: false, defaultPanel: -1 });
var Accordion2 = new Spry.Widget.Accordion("Accordion2", {
useFixedPanelHeights: false, defaultPanel: -1 });
var Accordion3 = new Spry.Widget.Accordion("Accordion3", {
useFixedPanelHeights: false, defaultPanel: -1 }, {
useFixedPanelHeights: false, defaultPanel: -1 });
var Accordion4 = new Spry.Widget.Accordion("Accordion4");
var Accordion5 = new Spry.Widget.Accordion("Accordion5", {
useFixedPanelHeights: false, defaultPanel: -1 });
//-->
</script>
but should be this
<script type="text/javascript">
<!--
var TabbedPanels1 = new
Spry.Widget.TabbedPanels("TabbedPanels1");
var Accordion1 = new Spry.Widget.Accordion("Accordion1", {
useFixedPanelHeights: false, defaultPanel: -1 });
var Accordion2 = new Spry.Widget.Accordion("Accordion2", {
useFixedPanelHeights: false, defaultPanel: -1 });
var Accordion3 = new Spry.Widget.Accordion("Accordion3", {
useFixedPanelHeights: false, defaultPanel: -1 });
var Accordion4 = new Spry.Widget.Accordion("Accordion4", {
useFixedPanelHeights: false, defaultPanel: -1 });
var Accordion5 = new Spry.Widget.Accordion("Accordion5", {
useFixedPanelHeights: false, defaultPanel: -1 });
//-->
</script>
Accordion3 and Accordion4 lines mixed up
Carl -
Is there a way to set all Spry Accordion panels closed? I
have set the js variable defaultPanel to null and no panels open
but I loose animation. My goal is to nest accordion panels and have
only the selected panel open when I click on it. Is this
possible?Is there a way to set all Spry Accordion panels closed? I
have set the js variable defaultPanel to null and no panels open
but I loose animation. My goal is to nest accordion panels and have
only the selected panel open when I click on it. Is this
possible? -
Setting accordion content panel height with hidden content
Following previous instructions, I set
<!--
var acc7 = new Spry.Widget.Accordion("Acc7", {
useFixedPanelHeights: false });
//-->
at the bottom of the content page. However, some of the
accordion panel content is hidden until the user selects a radio
button. The panel height is not dynamically adjusted to the
content. FYI, the content is hidden using
style.visibility = 'hidden
In SpryAccordion.css, I commented out the height attribute.
.AccordionPanelContent {
overflow: auto;
margin: 0px;
padding: 0px;
/* height: 200px; */
It appears to me that the panel height is still fixed, but by
what I am not sure. Any clues would be appreciated. Here's the demo
page:
http://www.phelpstek.com/cr/wildflower_wedding_favors/index.html
Thanks for any input/ideas.
Brian Phelps
www.phelpstek.comgraylensman wrote:
|| I'm working on a website with two column layout. The left
column
|| contains a list of site navigation links, the right column
contains
|| actual content for any given page. I'm using CSS to set a
left-hand
|| rule that runs the height of the right-hand column. On
some pages,
|| there's a lot of content; on others, very little. When
there's
|| little content, my rule doesn't run as long as the links
list,
|| because the rule is applied to the right column.
||
|| So, I want this rule to run at least as long as that left
column,
|| but run as long as the content in the right column when
needed. Here
|| are links to a couple of pages, so you can see what's
going on:
||
|| Good:
||
http://www.hillphoenix.com/web_redesign/techInfo/techInfo.html
||
|| Not so good:
||
http://www.hillphoenix.com/web_redesign/communications/whatsNew.html
||
||
|| Thanks for your help, in advance!
hello,
apply this to your right column div and change 430px to
whatever you want
min-height: 430px;
height:auto;
_height: 430px;
regards
bretz -
Firefox does not appear in 'set program defaults panel in Win 7', running firefox 4.1
In Win 7 Pro (up to date) Associate protocol with a default program, Firefox is not an option, only IE.
Go to Tools -> Options -> Advanced Section: General Tab. On the bottom there is System Defaults. Click Check Now to see if Firefox is the default browser. Click Yes on the pop up window.
Firefox is now back in the list for default programs and it your default browser again. -
Hi!
It seems, the Photoshop CS5 12.0.2 update sets the default panel's width to 10 px on Mac.
When I clean install the panel on new Photoshop it first opens like a thin line about 10 px width
and about 300px height. It looks very strange and some people cannot scale it back with ease.
(On Windows the 132px problem persists (bug #9 from here) even after update - panel cannot be scaled less than
132px)
Thanks
Update: This behaviour is also confirmed on Illustrator CS5, so I guess it's a wider thing connected to the latest update of some CS5 component.OK, I found the source of this bug.
minWidth. When you set minWidth on CSXSWindowedApplication with the latest updates to CS5, the suite will strangerly resize your panel to this minWidth whenever you try to set this.width. I will post it to the list of bugs.
The test case is very simple:
<csxs:CSXSWindowedApplication minWidth="10" applicationComplete="on_creation_complete()" xmlns:csxs="com.adobe.csxs.core.*" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" historyManagementEnabled="false">
<mx:Script>
<![CDATA[
private function on_creation_complete(): void
// the following line will scale the panel to its minWidth value instead of 500
this.width = 500;
this.height = 500;
]]>
</mx:Script>
<mx:VBox height="100%" width="100%" verticalAlign="middle" horizontalAlign="center">
</mx:VBox>
</csxs:CSXSWindowedApplication> -
Find a way to set Accordion open multi panel at the same time!
Now, I can set all the panel close by default !
But my client want when some panel has open , then he click
on the other panel, it doesn't make the pervious open panel closed,
until you click on it !
Does someone can help me?Hi,
you can use Collapsible Panel Group widget to achieve this
behavior.
Please take a look over this
sample
page.
Diana -
Accordian Set Default Panel Issues
I have a default panel that I am setting in my pages and when
I set default panel to 0 then it opens the first one, but now when
I try to set default panel to 1 it won't open the second one.
http://208.112.121.107/company/mission-statement.asp
(This has the default panel set = 0, Works!)
http://208.112.121.107/company/management-team.asp
(This has the default panel set = 1, doesn't work)
Any help would be appreciated.
Thanks!Nevermind I figured it out!
-
When I save my word 2013 documents as Adobe PDF I have to open the PDF up, go to File>Properties>Initial View>Navigation Tab and then set the initial view as Bookmark Panel and Page; it gets pretty tedious.
I use Save as Adobe PDF rather than Print to Adobe PDF Printer because I like being able to have the security settings automatically set.
I just want to be able to save my word document as Adobe PDF with the initial view already set as Bookmark Panel and Page, and with security, so I can send it out immediately.
Is this possible?
Thank you.Use the Firefox Android Addon - Phony
*https://addons.mozilla.org/en-US/android/addon/phony
for more
*https://addons.mozilla.org/en-US/android/ -
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 ?
GreetsPHP, 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
Maybe you are looking for
-
Opinion: What you do NOT like in Arch Linux?
Hello, I saw many topics about opinion of Linux and many like "why you have switched to Arch" but there was no topic about complaints. I know that most of Developers would not like to see topics like that but it is needed to improve this great di
-
Why am I no longer able to spend money on clash of clans, being told to go to iTunes support
-
salve ragazzi, da un mese ho cambiato il gestore telefonico, sono passato da Telecom a Fastweb, per tutto il mese la connessione è andata bene ma ora il wifi mi sta dando dei problemi, la connessione c'è, ma alcuni siti non riesco ad aprirli, ho chia
-
Safari is redirecting me to american version of all websites
safari repeatedly keeps on redirecting me to the american version of all websites. Don't know why. Please help
-
THIS PRINTER SUCKS BECAUSE YOU CANNOT PRINT WITHOUT HAVING ALL THE INK CARTRIDGES FULL. I REPLACED THE MAGENTA INK JUST FOR IT TO TELL ME THE CYAN INK WAS OUT AS WELL! I AM THROWING THIS PIECE OF S**T IN THE TRASH AND GOING BACK TO CANON. VERY DISSAT