Results 1 to 6 of 6

Thread: tab content script help

  1. #1
    Join Date
    Jun 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default tabbed document viewer script help

    Hi,

    I followed the instructions on http://www.dynamicdrive.com/dynamici...tabcontent.htm. It is a great effect.

    edit 6/18: I actually used http://www.dynamicdrive.com/dynamici...bdocviewer.htm

    However, when I posted a quick sample on http://www.geocities.com/jinenkamdar - when the user clicks on a tab, the page opens up (as if clicking a 'regular' link) instead of in the designated space below.

    When I tested this locally on my harddrive, the website worked as designed, so I'm not sure why uploading it on geocities causes this different behavior?

    Any ideas on how I can fix this?

    Thanks so much,

    -Jinen
    Last edited by jinen; 06-19-2005 at 05:15 AM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,496
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default the i's have it

    Geocities adds a number of scripts to the pages displayed on its servers. One of these scripts hijacks two commonly used variables (i & j). This breaks any script using i and/or j placed on a page on Geocities. There could be other problems but, to start with, replace:
    Code:
    function highlighttab(aobject){
    if (typeof tabobjlinks=="undefined")
    collecttablinks()
    for (i=0; i<tabobjlinks.length; i++)
    tabobjlinks[i].style.backgroundColor=initTabcolor
    var themecolor=aobject.getAttribute("theme")? aobject.getAttribute("theme") : initTabpostcolor
    aobject.style.backgroundColor=document.getElementById("tabcontentcontainer").style.backgroundColor=themecolor
    }
    with:
    Code:
    function highlighttab(aobject){
    if (typeof tabobjlinks=="undefined")
    collecttablinks()
    for (xdt=0; xdt<tabobjlinks.length; xdt++)
    tabobjlinks[xdt].style.backgroundColor=initTabcolor
    var themecolor=aobject.getAttribute("theme")? aobject.getAttribute("theme") : initTabpostcolor
    aobject.style.backgroundColor=document.getElementById("tabcontentcontainer").style.backgroundColor=themecolor
    }
    and replace:
    Code:
    function detectSourceindex(aobject){
    for (i=0; i<tabobjlinks.length; i++){
    if (aobject==tabobjlinks[i]){
    tabsourceindex=i //source index of tab bar relative to other tabs
    break
    }
    }
    }
    with:
    Code:
    function detectSourceindex(aobject){
    for (xdt=0; xdt<tabobjlinks.length; xdt++){
    if (aobject==tabobjlinks[xdt]){
    tabsourceindex=xdt //source index of tab bar relative to other tabs
    break
    }
    }
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi,

    I actually sent you the wrong link of the script I used.. I used the Tabbed Document Viewer: http://www.dynamicdrive.com/dynamici...bdocviewer.htm -

    I still went ahead and replaced 'i' with xdt, but I still have the same problem. The pages load on 'top' when you click on a link (e.g. Blog) and not in the designated area below.

    Any other ideas?

    http://www.geocities.com/jinenkamdar

    Thanks.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,496
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by jinen
    I actually sent you the wrong link of the script I used..
    You should be severely punished for that, lol. Anyways, after looking over a couple of the added scripts on your Geocities page I found one that is hijacking all iframes on the page. So, apparently they don't want you to display dynamic content in an iframe. Without going too much further I found they also frown on any scripts that allow you to display offsite content on their pages, opening it instead in the main window.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jun 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default sorry!

    sorry about providing the wrong link.. i apologize.

    thanks for investigating this for me.. maybe i will try a different web-host that permits these kind of webpages. (ideas?)

    thanks again!

    -jtk

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,496
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •