Pemanent link to specific spry tab
Hi,
I have a webpage that containd dynamically loaded spry tabs.
I need to creat a permanent link to a specific tab on that page
from my server for a different domain. What I have been tryiong to
do is write a normal link to use for this, something like:
http://
www.XXX.com?TabbedPanels1.showPanel(13);getPage('FrameSiten', '
http://XXX.com/directory/index.php'
but of course that will not work...
The tab is setup like this :
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="9"
onClick="getPage('FrameSiten', '
http://XXX.com/directory/index.php')">Directory</li>
Can anyone please help me with this as I have now searched
hundreds of pages on the web and found nothing that I can make
sence of...
Thanks
Add something like this under your tabbed panels constructor;
if(params.panel){
switch(params.panel){
case 1: getPage('FrameSiten', 'directoryindex.php');
break;
case 2: getPage('FrameSiten', 'whatever.php');
break;
case 3: getPage('FrameSiten', 'whatever.php');
break;
case 4: getPage('FrameSiten', 'whatever.php');
break;
case 5: getPage('FrameSiten', 'whatever.php');
break;
case 6: getPage('FrameSiten', 'whatever.php');
break;
default: null;
break;
(change the getPage to the event that matches the tab
number)
Similar Messages
-
Linking to specific spry tabbed panel - code not working
Hi,
I have followed the tutorial at
http://foundationphp.com/tutorials/spry_url_utils.php
with regard to being able to link to a specific tab. For some
reason though, my code doesn't work. I am usign Dreamweaver cs3,
and as soon as I head back to the design view, or preview it in a
browser for that matter, all I see is each tab one above the other,
and the tabs no longer work.
My code is as follows:
<script src="../SpryAssets/SpryTabbedPanels.js"
type="text/javascript"></script>
<link href="../SpryAssets/SpryTabbedPanels.css"
rel="stylesheet" type="text/css" />
<style type="text/css">
<script type="text/javascript"
src="SpryAssets/SpryURLUtils.js"></script>
<script type="text/javascript"> var params =
Spry.Utils.getLocationParamsAsObject(); </script>
is in the head, and the body for the tabbed panels is:
<div id="mainContent">
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0">1st
Team</li>
<li class="TabbedPanelsTab" tabindex="0">2nd
Team</li>
<li class="TabbedPanelsTab" tabindex="0">3rd
Team</li>
<li class="TabbedPanelsTab" tabindex="0">4th
Team</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">
<table width="100%" border="1" cellpadding="5"
cellspacing="1px" bordercolor="#929925">
<tr>
<td width="54%"><!-- TemplateBeginEditable
name="playername1" -->
<div align="center" class="style3 style5">Player
name</div>
<!-- TemplateEndEditable -->
<p align="center"><!-- TemplateBeginEditable
name="playerpic1" --><img alt="" name="playerpic" width="180"
height="245" border="1" id="playerpic" /><!--
TemplateEndEditable --></p>
<!-- TemplateBeginEditable name="playerinfo1" -->
<p align="center" class="style3 style6 style4">Click a
player name to view their profile. </p>
<!-- TemplateEndEditable -->
<p align="center"> </p></td>
<td width="46%"><p align="center"><!--
TemplateBeginEditable name="teamphoto1" --><img alt=""
name="teamphoto" width="250" height="150" border="1" align="top"
id="teamphoto" /><!-- TemplateEndEditable --></p>
<p align="center" class="style3 style4
style6"><u>Squad list</u></p>
<p align="center" class="style5"> </p>
<p></p></td>
</tr>
</table>
<p> </p>
<p> </p>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="1" cellpadding="5"
cellspacing="1px" bordercolor="#929925">
<tr>
<td width="54%">
<div align="center" class="style3"><!--
TemplateBeginEditable name="playername2" --><span
class="style5">Player name</span><!--
TemplateEndEditable --></div>
<p align="center"><!-- TemplateBeginEditable
name="playerpic2" --><img alt="" name="playerpic" width="180"
height="245" border="1" id="playerpic2" /><!--
TemplateEndEditable --></p>
<!-- TemplateBeginEditable name="playerinfo2" -->
<p align="center" class="style3 style4 style6">Click a
player name to view their profile.</p>
<!-- TemplateEndEditable --></td>
<td width="46%"><p align="center"><!--
TemplateBeginEditable name="teamphoto2" --><img alt=""
name="teamphoto" width="250" height="150" border="1" align="top"
id="teamphoto2" /><!-- TemplateEndEditable --></p>
<p align="center" class="style3 style4
style6"><u>Squad list</u></p>
<p align="center"> </p>
<p></p></td>
</tr>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="1" cellpadding="5"
cellspacing="1px" bordercolor="#929925">
<tr>
<td width="54%"><!-- TemplateBeginEditable
name="playername3" -->
<p align="center" class="style3 style6 style4">Player
name</p>
<!-- TemplateEndEditable -->
<p align="center"><!-- TemplateBeginEditable
name="playerpic3" --><img alt="" name="playerpic" width="180"
height="245" border="1" id="playerpic3" /><!--
TemplateEndEditable --></p>
<!-- TemplateBeginEditable name="playerinfo3" -->
<p align="center" class="style3 style6 style4">Click a
player name to view their profile.</p>
<!-- TemplateEndEditable -->
<p align="center"> </p></td>
<td width="46%"><p align="center"><!--
TemplateBeginEditable name="teamphoto3" --><img alt=""
name="teamphoto" width="250" height="150" border="1" align="top"
id="teamphoto3" /><!-- TemplateEndEditable --></p>
<p align="center" class="style3 style4
style6"><u>Squad list</u></p>
<p align="center"> </p>
<p></p></td>
</tr>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="1" cellpadding="5"
cellspacing="1px" bordercolor="#929925">
<tr>
<td width="54%"><!-- TemplateBeginEditable
name="playername4" -->
<div align="center" class="style3 style4
style6">Player name</div>
<!-- TemplateEndEditable -->
<p align="center"><!-- TemplateBeginEditable
name="playerpic4" --><img alt="" name="playerpic" width="180"
height="245" border="1" id="playerpic4" /><!--
TemplateEndEditable --></p>
<!-- TemplateBeginEditable name="playerinfo4" -->
<p align="center" class="style3 style4 style6">Click a
player name to view their profile.</p>
<!-- TemplateEndEditable -->
<p align="center"> </p></td>
<td width="46%"><p align="center"><!--
TemplateBeginEditable name="teamphoto4" --><img alt=""
name="teamphoto" width="250" height="150" border="1" align="top"
id="teamphoto4" /><!-- TemplateEndEditable --></p>
<p align="center" class="style3 style4
style6"><u>Squad list</u></p>
<p align="center" class="style5"> </p>
<p></p></td>
</tr>
</table>
</div>
</div>
</div>
<p> </p>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new
Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab:(params.tab ?
params.tab : 0)});
The link I would then use to link to tab 2 say, would be:
../"pagename".php?tab=2#TabbedPanels2
Also, when I then go to click on the Spry tabbed panels
region in design view, I get an error message saying:
while executing inspectSelection in spry_tabbedpanels.htm, a
javascript error occurred.
I am pretty inexperienced with Spry and Java so I may have
missed something simple.
A solution would be much appreciated as this is driving me
mad!
Please let me know if you need me to post more code.
Thanks in advance.
p.s. I am using Dreamweaver CS3 and the SpryURLUtils.js
script is from the Spry 1.6.1 prerelease framework.quote:
Originally posted by:
brownie_jedi
Ok, so I've just changed the code to <script
type="text/javascript"
src="../SpryAssets/SpryURLUtils.js"></script>
to mimic the code for <script
src="../SpryAssets/SpryTabbedPanels.js"
type="text/javascript"></script>
since the spry files are all in the same folder. Is this what
you meant?
Having just installed firebug, I get the error params is not
defined. So I guess that this all together means that the
SpryURLUtils.js file is not being called correctly?
p.s. Thanks for the speedy replies, much appreciated.
Yes it means it cant find the file SpryURLUtils.js.
in firebug theres a tab called scripts, if u click on it, u
can see wich scripts are loaded. i suggest u check that out. Or
post a online URL so we can see the problem for our selfs.. -
Linking to a specific spry tab in design view
hi there,
I am a dreamweaver novice and i only use design view for the most part. I am trying to make a link from some content in one tab to another tab. I looked up many such threads and they say that the spryurlutils.js is to be used. I do not know how and where to insert the script, because that area is uneditable in the code view. Here is the link to the URL.
http://192.168.17.13/testpagetraining.html
In the 'About training' tab, in the 2nd paragraph , there are the words "The Partnership".
I would like to make a link to the 3rd tab "The Partnership" from those words in the first tab.
Thanks.
AI cannot open the page at the location you specified, it looks like a local server.
I you want a tutorial on the subject, have a look here http://foundationphp.com/tutorials/spry_url_utils.php -
Link to specific accordion tab from other page
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 specific accordion tab on the recipes page?
For example: on the apple page there is a link to the apple pie recipe (which is inside an accordion)
is that possible?
yd.i meant.
if you have a page. and on that page there is an accordion with multiple tab (or panel or whatever they are called)
i would need to make link on another page that link straight to a specific opened tab in the accordion. like an anchor link on another page, but
have the accordion panel open instead.
understand
sorry for the lousy english.
yd. -
Targeting a specific Spry tab in an A Href
Can i somehow tell the Spry tabs to focus on a tab other than
the first one on page load?Due to the Spry framework being fairly new, you may be best
asking this
question in the Spry specific forum:
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=602
Nadia
Adobe® Community Expert : Dreamweaver
CSS Templates |Tutorials |SEO Articles
http://www.DreamweaverResources.com
~ Customisation Service Available ~
http://www.csstemplates.com.au
"jasals" <[email protected]> wrote in
message
news:f5e38m$dnu$[email protected]..
> Can i somehow tell the Spry tabs to focus on a tab other
than the first
> one on page load? -
Opening specific Spry tabbed panels not working or displaying in IE
I have a tabbed panel spry widget on an asp page in Dreawmweaver (http://www.herbsmithinc.com/casedog.asp) that worked marverously across IE, Firefox and Safari until I tried to get different panels to open on load through links. I used the following tutorial: http://foundationphp.com/tutorials/spry_url_utils.php
Everything works as it should in Firefox and Safari but the panels all appear at once, stacked down the page in IE. Does anyone have a fix for this or see what it is I'm doing wrong?
Thanks!!I added the code, but It didn't work
I just noticed that there's an error on the page when it loads in IE:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.6; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Thu, 24 Mar 2011 15:05:33 UTC
Message: 'Spry.Widget.TabbedPanels' is null or not an object
Line: 292
Char: 1
Code: 0
URI: http://www.herbsmithinc.com/casedog.asp
I searched the error but didn't come up with too much. Any other suggestions? I really appreciate the help!! -
Need help linking spry tabbed panel from external page
Could use some help. I need to link to a specific spry tabbed panel on page "A" from a link on page "B" I have tried several "solutions" on the web and had no luck. When I add the code needed at the bottom of the code where you initiate the instance, it stacks the content of ALL panels in the first panel, and renders the tabs inoperable. This is a key feature I need in a new site being developed.
I need to link to a specific spry tabbed panel on page "A" from a link on page "B" I have tried several "solutions" on the web and had no luck.
Have you tried http://foundationphp.com/tutorials/spry_url_utils.php ?
When I add the code needed at the bottom of the code where you initiate the instance, it stacks the content of ALL panels in the first panel, and renders the tabs inoperable.
Depending on what the code looks like, it can do all sorts of things.
Please be reminded that the best way for us to help you is by you supplying a link to your site with a one sentence description of the problem.
Gramps -
HI there I'm new to this whole spry thing heck I'm even new
to posting; I'm trying to link to a spry tab from a flash button
and well it's just not working I can use the sample as written
http://labs.adobe.com/technologies/spry/samples/tabbedpanels/tabbed_panel_sample.htm
and it will work to change tabs but I guess I'm not using it
right for the flash button I've tried to set the
onclick="TabbedPanels1.showPanel(0); return false;"
and that didn't work and I also tried going into the code and
adding
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width="132" height="31" a href="#"
onclick="TabbedPanels1.showPanel(0); return false;">
and that doesn't work either what am I doing wrong? sorry if
I posted in the wrong place. Thanks in advance for the help
labs.adobe.com/technologies/spry/samples/tabbedpanels/tabbed_panel_sample.htmIt is possible to link to a specific tabbed panel from another page, may I suggest you use the following link to visit a post in the spry forum were you will find all the steps needed to do this.
http://forums.adobe.com/thread/48312
Richard -
Can anyone tell me how to target a specific Spry tab from an
external link?This is the correct answer - thanks. - searched all day for this
In the head JS tag add the following after
var dsCities = new Spry.Data.XMLDataSet("xml/{dsStates::url}", "state/cities/city");
var statenum = 20; // Sets dsStates to the 21st node value = MA Massachusetts - observer will default the dsCities to massachusetts.xml
// add an array search to return the index for statenum
dsStates.addObserver({ onDataChanged: function(ds, type) { dsStates.setCurrentRowNumber(statenum); } });
There should be a a cookbook on SPRY of popular needed functions - the samples are fragments but it takes a lot of work, the hard way to learn and piece it together.. -
Spry tabbed panels not opening in IE on Vista
Link:
About
page
Link:
Story
page
Spry tabbed panels on these pages display fine in Firefox and
Safari.
But in IE on two separate Vista-running PCs, everything
except the tabs themselves loads, until you click refresh one or
more times. Both PCs were on broadband connections and I checked
each PC several times just to make sure it wasn't just an
intermittent connection.
Way to fix this for IE? As far as my client is concerned,
it's a bug.Dear all, thanks for your replies.
I have tried Barascu Diana's fix to both pages linked at the
top, but am presently unable to test it on IE6. Anyone able to see
if those tabs are now appearing?
<DIV class="TabbedPanel" id="TabbedPanels1" style
="position:relative">
(Hope I did this right?)
I also temporarily tried kinblas' fix, but removing relative
positioning there caused the tabs to hover over to the left of the
page. -
How do i link to a specific tab using the spry tabbed widget
Hello i'm working on a microsite using the spry tabbed widget. I'm having trouble figuring out how to link to a specific tab using a an external link.
here is the site. http://www.efaxcorporate.co.uk
for example: if i wanted to give a user a url link specifically tab#2.
Im sure this is really easy i just can't seem to figure it out.Try http://foundationphp.com/tutorials/spry_url_utils.php
-
Spry Tab link only works once... why?
Hi all,
I have a spry tabbed area with 4 tabs on my page. Each tab contains data that is dragged from an MSAccess table. A couple of the tabs have repeat regions. This all works fine. One of my tabs has a repeat region where I can click on a button image to change a record status from True to False (or visa versa). The click runs the associated vbscript which executes the SQL update statement no problem. However I noticed that when I changed the data on this tab and reloaded the page using a Response.redirect after the sql update was executed, it would default to the 1st tab and not the one I was viewing that contains the repeat region. A quick search led me to the SpryURLUtils.js file which solved that problem by allowing me to specify which tab to load. I appended the relevant code to give me this:
Response.Redirect("myrecord.asp?" & Request.QueryString & "&tab=1#TabbedPanels1"
As I mentioned, the tab contains a repeat region. If I click on a button to change the status of that record the page reloads fine and displays the correct tab. But this only happens once... each subsequent time I try to change another record my tab contents disappear. The tabs are still visible and if I click on the tab where I've changed the data the tab content is dispalayed, but obvioulsy this isn't right... it should reload and display the correct tab with each call of the code.If I navigate away from this page and then come back to it I can successfully chnage one record and the results are displayed. Change another record and the changes are made, but the tab contents are not displayed again. The interesting thing is that if I reload/refresh the page the problem occurs staright away on the first record change.
So my question is 2-fold... Why is this happening and how do I solve the problem?
Here is the vbscript that updates the record and does the Response.redirect
<%
'Change Notification
If (CStr(Request("ToggleNotify")) = "ToggleNotify") Then
dim strSQL
'check to see if notification is currently true or false
If cstr(Request.Form("NotifyChanges")) = Cstr("True") Then
'change notifiaction to false
strSQL = "UPDATE tblUserAccess SET NotifyChanges=0 WHERE AccessID = " & Request.Form("hiddenAccessID")
else
strSQL = "UPDATE tblUserAccess SET NotifyChanges=-1 WHERE AccessID = " & Request.Form("hiddenAccessID")
end if
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_VBUsers_STRING
MM_editCmd.CommandText = strSQL
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
Response.Redirect("myrecord.asp?" & Request.QueryString & "&tab=1#TabbedPanels1" )
End If
%>
Here is my Repeat region with the associated form
<%
While ((Repeat3__numRows <> 0) AND (NOT rsAccessRights.EOF))
%>
<form name="frmNotifications" method="post" action="">
<tr class="PageText">
<td width="200"><%=(rsAccessRights.Fields.Item("SectionTitle").Value)%>
<input type="hidden" name="hiddenAccessID" id="hiddenField2" value="<%=(rsAccessRights.Fields.Item("AccessID").Value)%>">
</td>
<td width="200">
<%If (CStr((rsAccessRights.Fields.Item("NotifyChanges").Value)) = CStr("True")) Then %>
<input type="image" src="../sitegraphics/accept.png" alt="Submit button">
<%else%>
<input type="image" src="../sitegraphics/cross.png" alt="Submit button">
<%end if%>
<input type="hidden" name="ToggleNotify" value="ToggleNotify">
<input type="hidden" name="NotifyChanges" id="test" value="<%=cstr((rsAccessRights.Fields.Item("NotifyChanges").Value))%>">
</td>
</tr>
</form>
<%
Repeat3__index=Repeat3__index+1
Repeat3__numRows=Repeat3__numRows-1
rsAccessRights.MoveNext()
Wend
%>
And here is the bit at the bottom that specifies the default tab if nothing is passed in the URL
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab: params.tab ? params.tab : 0});
//-->
</script>
Sorry for the long post!
This is my first dabble with Spry stuff, so I'm a bit green. If anyone can explain to me why this is happening that would be most apopreciated. If anyone can tell me how to solve the problem I'll send them a big e-kiss!
Not sure how impotant this is but it happens in both Firefox and IE8.
Thanks in advance
DanHi Ben, thanks for taking the time to read my query.
The site in question is an intranet site, so I am unable to give you a link to the page. Would the entire page of code rather than just the odd bits help?
Cheers
Dan -
I've created a page with spry tabs and want to place a link
on a tab that will take the user to a place on another tab. I
assumed that I would use named achors but can't get them to work.
Any ideas?RSW14 wrote:
> I've created a page with spry tabs and want to place a
link on a tab that will
> take the user to a place on another tab.
To open another tab from anywhere in the same page, give the
target tab
an ID, and create the link like this:
<a href="javascript:;"
onclick="TabbedPanels1.showPanel('targetID')">Go
to other tab</a>
To go to a specific place within a tabbed panel, you would
need to use
SpryURLUtils.js, which is part of the Spry framework that you
can
download from Adobe Labs. Details of how to use it are on the
following
page:
http://labs.adobe.com/technologies/spry/samples/utils/URLUtilsSample.html
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS4",
"PHP Solutions" & "PHP Object-Oriented Solutions"
http://foundationphp.com/ -
Within one html file divided into Spry-tabs, I set a named
anchor in tab-content <div> of one tab and try to link to it
from within a different tab-content division of the same page.
Doesn't work - just sends me to bottom of division in the which
link is located. Surely this is doable -- Am I missing some simple
point?bob_atlanta wrote:
> Within one html file divided into Spry-tabs, I set a
named anchor in
> tab-content <div> of one tab and try to link to it
from within a different
> tab-content division of the same page. Doesn't work -
just sends me to bottom
> of division in the which link is located. Surely this is
doable -- Am I
> missing some simple point?
You have to know which tab the anchor is within and then you
can show a specific tab. Check out the code on this page:
http://labs.adobe.com/technologies/spry/samples/tabbedpanels/tabbed_panel_unobtrusive.htm
FYI: Spry questions are probably best asked in the Spry
forum:
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=602
Danilo Celic
|
http://blog.extensioneering.com/
| WebAssist Extensioneer
| Adobe Community Expert -
Link to Spry Tabbed Panels Tab?
Is it possible to link to a specific Spy Tabbed Panels tab from another page?
Thanks.It is possible to link to a specific tabbed panel from another page, may I suggest you use the following link to visit a post in the spry forum were you will find all the steps needed to do this.
http://forums.adobe.com/thread/48312
Richard
Maybe you are looking for
-
Error in executing eCATT GUI Script
Hi I am getting following error (in bold) while executing eCATT GUI Script. This happens only for GUI Scripts and not for TCD scripts. Please help me to solve this issue. <b>0000000195 Test Scrpt ZGUI_SCRIPT4 Version 1 - SECATT [Without Interruption
-
Okay, this is going to be kind of long, I apologize. So, I have a Macbook Pro that is a few years old (it's the last model to have the one button). Recently, by original power cord got frayed and stopped functioning, so I got a new one. I got the new
-
DLV status not updated in Process order
Hi guys, I did GR and got goods receipt documents but system is not updating DLV status in process order. Actually i have by-product and co-products as components in order. I did posting of by-product from Confirmation screen COR6N and for co-produ
-
Cairo-compmgr corrupts second monitor
Hey all, I just set up openbox with cairo-compmgr, and it works great when I'm just using my laptop screen... however when I enable my secondary 22" monitor, the second display is "corrupted." What I see is similar to the ie6 effect. I've tried both
-
TS5181 Help... Itunes Radio on Fast Forward
My itunes radio is fast forwarding through all songs and only playing ads on all the stations. I have closed the app at tuned the device off/on without success. It was working fine prior to downloading the saftey fix last night. Any recommendation