ddusr
03-19-2007, 05:21 AM
1) Script Title: Tab Content Script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm
3) Describe problem: I am fiddling with this script for quite some time now but unable to make it work. Please help me.
I am attaching the sample page I used to test. I havent changed anything in th CSS or Javascript. When the page loads for the first time content of first tab appears. When I click on any other tabs nothing appears; also i f I click back on first one no content appears!
Hope you wizards can tell me my mistake. Thanks a lot in advance.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Testt</title>
<link href="tabcontent.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="tabcontent.js">
/***********************************************
* Tab Content script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
</head>
<body>
<div>
<ul id="maintab" class="shadetabs">
<li class="selected"><a href="#" rel="tcontent1">Over</a></li>
<li><a href="#" rel="tcontent2">Specs</a></li>
<li><a href=""#" rel="tcontent3">Loca</a></li>
</ul>
</div>
<div class="tabcontentstyle">
<div id="tcontent1" class="tabcontent">
History reveal that civilizations have planted their root beside rivers.
</div>
<div id="tcontent2" class="tabcontent">
<ul>
<li>One</li>
<li>Two</li>
<li>Three Four Five</li>
</ul>
</div>
<div id="tcontent3" class="tabcontent">
<img src="test.gif">
</div>
</div>
<p>Paragraph One.</p>
<script type="text/javascript">
<!--
initializetabcontent("maintab")
-->
</script>
</body>
</html>
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm
3) Describe problem: I am fiddling with this script for quite some time now but unable to make it work. Please help me.
I am attaching the sample page I used to test. I havent changed anything in th CSS or Javascript. When the page loads for the first time content of first tab appears. When I click on any other tabs nothing appears; also i f I click back on first one no content appears!
Hope you wizards can tell me my mistake. Thanks a lot in advance.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Testt</title>
<link href="tabcontent.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="tabcontent.js">
/***********************************************
* Tab Content script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
</head>
<body>
<div>
<ul id="maintab" class="shadetabs">
<li class="selected"><a href="#" rel="tcontent1">Over</a></li>
<li><a href="#" rel="tcontent2">Specs</a></li>
<li><a href=""#" rel="tcontent3">Loca</a></li>
</ul>
</div>
<div class="tabcontentstyle">
<div id="tcontent1" class="tabcontent">
History reveal that civilizations have planted their root beside rivers.
</div>
<div id="tcontent2" class="tabcontent">
<ul>
<li>One</li>
<li>Two</li>
<li>Three Four Five</li>
</ul>
</div>
<div id="tcontent3" class="tabcontent">
<img src="test.gif">
</div>
</div>
<p>Paragraph One.</p>
<script type="text/javascript">
<!--
initializetabcontent("maintab")
-->
</script>
</body>
</html>