View Full Version : Can Switch Menu and Tab Content scripts live together?

02-03-2007, 08:18 AM
1) Script Title: SwitchMenu and Tab Conent Script

2) Script URL (on DD):

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:

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

02-03-2007, 04:56 PM
I don't see any Dynamic Drive script credits on your page:

Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), 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:


You have:

<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:


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.

02-07-2007, 09:04 AM
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