View Full Version : DD Tab Menu II -- Need to set tab content based on page displayed

09-05-2008, 08:35 PM
1) Script Title: DD Tab Menu II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddtabmenu2.htm

3) Describe problem: The script hardcodes the initial tab content display. I would like to initialize (onload) the tab content based on which page is currently being displayed instead of always showing the same initial tab content.

I have tabs SC1 thru SC6 each with 2 to 5 tab content links. While SC1 tab content is be displayed after an initial user login, when they click ABC link on the SC3 tab content, I want the SC3 tab to be highlighted and the SC3 tab content to be displayed not the SC1 tab and SC1 tab content.

Thanks for your help.

09-05-2008, 08:46 PM
In short, this basically needs to be done on the server side. The script does let you specify which tab should be initially selected when the page loads, using the line:

var initialtab=[1, "sc1"]

It's up to you then to change the above setting depending on which page is loaded. If you can't do that, you may want to look at Mouseover Tabs Menu (http://www.dynamicdrive.com/dynamicindex1/mouseovertabs.htm), which lets you select a particular tab by using the URL parameter (see bottom of script page).