View Full Version : Tab content script+PHP

01-17-2007, 02:18 AM
1) Script Title: Tab Content Script

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

3) Describe problem: how can i use php codes in tabs?i tried use but i couldnt...

This is code:

<ul id="maintab" class="shadetabs">
<li class="selected" id="1"><a href="#" rel="tcontent1">Gündem</a></li>
<li id="2"><a href="#" rel="tcontent2">Etkinlikler</a></li>
<li id="3"><a href="#" rel="tcontent3">Faaliyetler</a></li>
<li id="4"><a href="#" rel="tcontent4">Belediyemiz</a></li>
<li id="5"><a href="#">Köşe Yazıları</a></li>

<div class="tabcontentstyle">

<div id="tcontent1" class="tabcontent">
<?php include ("exp1.php"); ?>

<div id="tcontent2" class="tabcontent">
<?php include ("exp2.php"); ?>

<div id="tcontent3" class="tabcontent">
Tab content 3 here<br />Tab content 3 here<br />

<div id="tcontent4" class="tabcontent">
Tab content 4 here<br />Tab content 4 here<br />


<script type="text/javascript">
//Start Tab Content script for UL with id="maintab" Separate multiple ids each with a comma.

when i use php code only in one tab, it works; but when i use php code for two tabs it doesnt work.
can you help please?

01-17-2007, 02:52 AM
Can you be a bit more specific? What were you trying to do with PHP? etc.

01-17-2007, 02:56 AM
What's in the pages you are trying to include? It could be something in one or more of them that is causing your problem.

01-17-2007, 03:21 AM
thank for your replies.you are right thetestingsite some wrong code in my php pages was causing the problem.i can solve this now.thanks again.