PDA

View Full Version : Tab Content Script (v 2.2) - Need help with tab selection



Disgro
05-29-2012, 08:01 PM
1) Script Title: Tab Content Script (v 2.2)

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

3) Describe problem:

I am building a landing page for a client and have installed the Tab Content Script (v 2.2) However now the client wants the ability to have a page open on tab 2 or tab 3, by default the page opened on tab 1 just fine.

I feel like I have installed the script correctly however I am unable to set a tab to be selected on page load. It always opens tab 1.
I have changed the tag link to linkparent to no avail.

Can some one please help me with this issue.

Thank You

Here is the url to the landing page:
http://cmmapi.com/adobe/adb1205_ax_welcomeseries_lp2/adb1205_ax_welcomeseries_lp2.html

and if needed the url to the tabcontent.js file (i have not modified it)
http://cmmapi.com/adobe/adb1205_ax_welcomeseries_lp2/_js/tabcontent.js

ddadmin
05-29-2012, 10:52 PM
Simply give the tab link (<A>) you want selected by default a CSS class of selected:


<div id="tab_menu" class="indentmenu" >

<div><a href="#" rel="tab_1" >Convert PDF files</a></div>

<div style="width:1px; background-color:#d9d9d9; float:left; height:32px;"><img src="_img/spacer.gif" width="1" height="1" /></div>

<div><a href="#" rel="tab_2" class="selected">Convert to Word</a></div>

<div style="width:1px; background-color:#d9d9d9; float:left; height:32px;"><img src="_img/spacer.gif" width="1" height="1" /></div>

<div ><a href="#" rel="tab_3" class="selected">Convert to Excel</a></div>

</div>

This is explained midway on the script page.

Disgro
05-29-2012, 11:33 PM
Thank you for the follow up...however I have tried that and if you look at your code sinpet I have added that on the tab_3 <a> tag.

ddadmin
05-30-2012, 07:19 AM
Try closing the browser window and relaunching it to view the page- is the 3rd tab now selected by default?

Disgro
05-30-2012, 05:30 PM
nope it still stays on tab 1