Results 1 to 5 of 5

Thread: Tab Content Script (v 2.2) - Need help with tab selection

  1. #1
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tab Content Script (v 2.2) - Need help with tab selection

    1) Script Title: Tab Content Script (v 2.2)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...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_w...eries_lp2.html

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

  2. #2
    Join Date
    Aug 2004
    Posts
    9,897
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    Simply give the tab link (<A>) you want selected by default a CSS class of selected:

    Code:
    <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.
    DD Admin

  3. #3
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  4. #4
    Join Date
    Aug 2004
    Posts
    9,897
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    Try closing the browser window and relaunching it to view the page- is the 3rd tab now selected by default?
    DD Admin

  5. #5
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    nope it still stays on tab 1

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •