PDA

View Full Version : Help with Tab Content Script



drmeisner
10-01-2010, 10:34 PM
1) Script Title: Tab Content Script

2) Script URL (on DD): http://dynamicdrive.com/dynamicindex17/tabcontent.htm

3) Describe problem:
I am using the above script. I am also quite familiar with its cousin, that uses AJAX to populate the divs. Here is my test page: http://www.dwaynemeisner.com/census/novascotia/annapolis1861/index.php
I have only populated two of the tab divs at this point: Belleisle & Bridgetown. What I am doing is transcribing census records and placing them online. The setup is to have a main index page for each county for each year, with a tab for each census district. This works fine. However, some of the census tables in the divs are very long. Some of my users have asked me to make a way to print the census table without scrolling all the way to the top of the page to click the pre-made printer friendly print button. So, I decided to use the Top Message script, also on DD. I have an html page for this: http://www.dwaynemeisner.com/census/novascotia/annapolis1861/belleisle.html I also have setup a search engine that is PHP based to index all the names and places for the census. Here is what I want to do:
When a user searches, and then clicks on the result, I want the index page (above) to open, with the correct tab based on the search already selected. Or they may manually navigate to the page from the main province index (not shown here), then click on a tab themselves. The index page will hold the Top Message Script, that says " Click Here To Print This Census Transcript". When this is clicked, I want the special html page to open in a new window or tab, based again on the pre-selected tab. I got some things working by themselves, such as having the Top Message Script open the page, and the print dialog box, but I can't figure out how to marry the three things together. I think I have to pass the rel attribute as a variable, but I am not sure... I hope I have made myself clear. I have not included any code, because it is scattered across several pages. If you need to see the code, I would recommend that you view the page source.

Thanks in advance.