PDA

View Full Version : Tab Content Script Issue - Reposting with explanation



Rohit Malik
07-19-2007, 02:11 AM
1) Script Title: Tab Content Script

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

3) Describe problem:

On clicking any tab, the code tries to open a url ( http://www.mydomain.com/# ) instead of switching to that tab :


<ul id="maintab" class="shadetabs">
<li class="selected"><a href="#" rel="tcontent1">Tab 1</a></li>

<li><a href="#" rel="tcontent2">Tab 2</a></li>

</ul>


<div class="tabcontentstyle">

<div id="tcontent1" class="tabcontent">

Tab 1 content here
</div>


<div class="tabcontentstyle">

<div id="tcontent2" class="tabcontent">

Tab 2 content here

</div>
</div>

<script type="text/javascript"><br/>//Start Tab Content script for UL with id="maintab"

Separate multiple ids each with a comma.<br/>initializetabcontent("maintab")<br/></script>

ddadmin
07-19-2007, 04:43 AM
Please post a link to the page on your site that contains the problematic script so we can check it out. FYI it'll generally do that if the script is not installed or working properly.

Rohit Malik
07-19-2007, 05:05 AM
just visit www.delhievents.com & look at the bottom ( not footer ) of the content area at the centre.

ddadmin
07-19-2007, 05:34 AM
Hmmm one glaring problem is the following:


<script type="text/javascript"><br/>//Start Tab Content script for UL with id="maintab"

Separate multiple ids each with a comma.<br/>initializetabcontent("maintab")<br/></script>

You have yet to initialize the script, and what you have inside the script tags should be commented out. Per the instructions on the DD demo page, the result should look something like:


<script type="text/javascript">

initializetabcontent("maintab")

</script>

Please read the instructions for the script again.

Rohit Malik
07-19-2007, 05:38 AM
oh thanks! And sorry for the silly mistake!

Regards, Rohit