Log in

View Full Version : link to specific tab from another page



slayerboyjr
02-15-2005, 06:14 AM
This is my very first post, so I hope I'm doing this right.

I came across this script:

http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

Here's what I'm trying to do. I have two pages. PageA.html has the Tab Content script and the default tab is "Dynamic Drive".

PageB.html has the following links:

Dynamic Drive, What's New, What's Hot, Search

What I want to do is that when I click a link on PageB.html, for example, "What's Hot" it should go to PageA.html and display the "What's Hot" tab instead of the default "Dynamic Drive".

Essentially, I want to change the Tabs on PageA.html by clicking the links on PageB.html.

I'm really stumped on how to do this.

Thank you to everyone.

SB

ddadmin
02-16-2005, 11:55 PM
Hi:
What you're looking for is essentially a "site wide" cookie persistence feature. Currently the script only supports "local" persistence, whereby the tab order is remembered for only that page. An example of a "site wide" cookie persistence can been seen in the Switch Menu script, which we recently modified for this: http://dynamicdrive.com/dynamicindex1/switchmenu.htm

I'll make a note of this and consider adding the same feature to the Tab Content script soon.

slayerboyjr
02-18-2005, 04:14 PM
Thank you. I'll see what I can do with the information you suggested.

ddadmin
02-18-2005, 08:50 PM
Ok, script updated for "sitewide" persistence as well: http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm Enjoy :)

slayerboyjr
02-18-2005, 09:35 PM
Thank you.

So, if I had the "Dynamic Drive", "What's New", "What's Hot" and "Search" links on another page (page1) and wanted to change the Tabs (page2), I could?

Any ideas as to how?

Thanks again. I really appreciate your help.

ddadmin
02-18-2005, 09:54 PM
If I understood you correctly, simply set persistype="sitewide" inside the cookie script will do.

slayerboyjr
02-19-2005, 06:51 PM
I'm sorry I guess I'm not explaining myself clearly. Here's what I'd like to do.


page1.html

This page has some content with the following:

Hi my name is Joe and if you would like to learn about transportation click the following links:

<a href="page2.html?tab=cars"> Cars </a>
<a href="page2.html?tab=trucks"> Trucks </a>
<a href="page2.html?tab=boats"> Boats </a>
<a href="page2.html?tab=planes"> Planes </a>

------------------------------------------------------------------

Note: I'm assuming I need to send variables to make the appropriate TAB display on page2.html.

When you click any of the above links on page1.html the appropriate TAB on page2.html would be displayed.

It's like using an anchor tag to go to the specific section of another page. I'd just like to reference a tab from another page.

------------------------------------------------------------------


page2.html

This page has the TAB Content Script and the following TABs and their corresponding content:

Cars, Trucks, Boats, Planes



Thank you so much for your time.

ddadmin
02-24-2005, 05:23 PM
Ah I see now. This would be a script customization, and due to time constraints, right now I can't help out unfortunately. If someone else has the time, please take a look.

slayerboyjr
02-24-2005, 07:25 PM
That's okay. Thanks for helping me so far.