Results 1 to 3 of 3

Thread: Can Switch Menu and Tab Content scripts live together?

  1. #1
    Join Date
    Feb 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Can Switch Menu and Tab Content scripts live together?

    1) Script Title: SwitchMenu and Tab Conent Script

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

    3) Describe problem:

    I have installed both above mentioned scripts and whenever they are loaded in the same page only the tab works while the switchmenu no longer.
    The strange is that error( checked with Mozilla javascript console ) come from the tab script which is working perfectly!
    You may check the error for testing in the following url:
    http://www.hwt.it/zainetto/catalog/p...ducts_id=13840

    The menu on left in all other pages of the site works 100% but stop only when it is loaded together with tab script.

    Any idea of known incompatibility?

    Thanks in advance

    Rudy from Italy

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

    Default

    I don't see any Dynamic Drive script credits on your page:

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    The problem is that you are not using the code as shown on the demo page for SwitchMenu script:

    Code:
    SwitchMenu('sub1')
    You have:

    Code:
    <div id=8999 class=switchcontent><span class="categoriaFiglia2_in">I Nostri PC Desktop&nbsp; ( 11 )</span><br></div><div class="categoriaMadre" onclick="expandcontent(9000);"><a href="index.php?cPath=9000" class="" title="Visualizza le sottofamiglie della categoria Notebook">Notebook</a>&nbsp; (160)</div><div id=9000 class=switchcontent><a href="index.php?cPath=9000
    But, expandcontent is part of the tab script. In fact, the more I look at this the more it appears that you are not even using the:

    http://www.dynamicdrive.com/dynamici...switchmenu.htm

    script as you claim or, if you are, you have modified it or are simply not following the instructions from its demo page.

    Also, the id of an element should begin with a letter, not a number. Class and id values should be quoted in the markup.
    - John
    ________________________

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

  3. #3
    Join Date
    Feb 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks John
    sorry for the credits: I supposed they should be only in the JS but I have corrected and now it is ok.
    It was my fault since I misunderstood the quoting of the markup.
    Now works fine

    Bye

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
  •