View Full Version : Link to a page must be in same content

12-06-2009, 09:05 AM
1) Script Title:
Ajax Tabs Content Script (v 2.2)
2) Script URL (on DD):
3) Describe problem:

i have included the ajax tabs on my webpage:

i want to load links in the same content.

i can't figure it out how :(

doesn't work:
<a href="fotos.php?tabinterfaceid=content">Target Page</a>
<a href="javascript: countries.loadajaxpage('fotos.php')">fotos</a></p>

12-06-2009, 09:42 AM
There is no javascript on photos.php, so the query string cannot be used for anything with Ajax Tabs Content Script (v 2.2).

This syntax:

<a href="javascript: countries.loadajaxpage('fotos.php')">fotos</a>

can work, but it needs to be somewhere that it can access the Ajax Tabs Content Script (either on the 'top' page with the script, or in a page loaded into the 'top' page with the script. And the fotos.php page must be in the same folder as the 'top' page. The countries tabs must be defined on the 'top' page.

If you are using your index.php page as the top page, as appears to be the case, where you have:

<script type="text/javascript">

var myflowers=new ddajaxtabs("flowertabs", "flowerdivcontainer")
myflowers.setselectedClassTarget("link") //"link" or "linkparent"

on index.php, the highlighted part is an error. Your instance is myflowers and pageurl needs to be replaced by an actual quoted page. So, to work, it should be something like:


Or if you don't need that or something like it there, just get rid of that line.

Now, let's say you load in fotos.php by clicking on the:

<li><a href="fotos.php" rel="flowerdivcontainer" >Foto's</a></li>

tab. That will bring in:




So you will see:


Let's say you want to have a link on fotos.php so that once it has been brought into index.php it can bring in wirdum.php to index.php, make fotos.php look like so:



<a href="javascript: myflowers.loadajaxpage('wirdum.php')">Wirdum</a>

12-06-2009, 10:55 AM
Very good explanation, jscheuer1. it works like that ! I'm happy now ! The problem was indeed the myflowers.loadajaxpage.

many thanks for the fast reply. No i can go further :)