Spry Widget Tabbed Browsing

Posted on 2012-09-18
Medium Priority
Last Modified: 2012-09-28

I have a question in regards to tabbed browsing widget found in Dreamweaver CS6 Spry features.

I have setup tabbed browsing and it seems to work okay except for one little thing. When I click on a link under any of the tabs >1 and then hit the (back) button to return to previous page to click on another link, it always returns me to the first tab.

I would like it to stay on the tab that I have selected when I return from a link I have clicked open.

To make it really easy to understand my problem, please visit the page I am working on right now;


click on any one of the Chapters >1 and then click a link below. Now go Page Back and observe it has returned to the 1st tab. This is frustrating when I want to view mulitple documents in Chapter 3 but have to keep clicking back on the chapter 3 tab.

Thanks for looking!
Question by:zbox
LVL 70

Accepted Solution

Jason C. Levine earned 2000 total points
ID: 38412187
First off, don't use Spry.  Adobe has discontinued development of it and you should really switch to JQuery which features a number of tabbed panel widgets that makes life a lot easier and provides the functionality you want.

Spry doesn't support remembering which tabbed panel was last loaded.  You have to add a javascript cookie or server-side session to store that information and write it back to the Spry constructor when the page is loaded again.  The documentation is here:


The constructor would look like this:

<script type="text/javascript">
   var tp1 = new Spry.Widget.TabbedPanels("myTabbedPanels",{defaultPanel:<?php echo $_SESSION['lastclick']; ?>, duration:200, tabHoverClass:'red'});  

And you would have to figure out exactly how to store the click information or get it into the session.  You might even consider using the http referrer value to check to see what the last page was and then set defaultPanel accordingly.

Author Closing Comment

ID: 38444862
I am going to take your advice and no longer use Spry and move on to bigger and better things. I'm glad I know this now and didn't waste any more time on learning it.

You answered that perfectly and it was very easy to understand.

Thanks a bunch!

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question