Results 1 to 3 of 3

Thread: Link to a page must be in same content

  1. #1
    Join Date
    Dec 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Link to a page must be in same content

    1) Script Title:
    Ajax Tabs Content Script (v 2.2)
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...tent/index.htm
    3) Describe problem:

    i have included the ajax tabs on my webpage:
    http://www.wirdumonline.nl/vier/

    i want to load links in the same content.

    i can't figure it out how

    doesn't work:
    http://www.wirdumonline.nl/vier/fotos.php?flowertabs=1
    <a href="fotos.php?tabinterfaceid=content">Target Page</a>
    <a href="javascript: countries.loadajaxpage('fotos.php')">fotos</a></p>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

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

    Code:
    <script type="text/javascript">
    
    var myflowers=new ddajaxtabs("flowertabs", "flowerdivcontainer")
    myflowers.setpersist(true)
    myflowers.setselectedClassTarget("link") //"link" or "linkparent"
    myflowers.init()
    instance.loadajaxpage(pageurl)
    </script>
    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:

    Code:
    myflowers.loadajaxpage("wirdum.php");
    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:

    Code:
    <li><a href="fotos.php" rel="flowerdivcontainer" >Foto's</a></li>
    tab. That will bring in:

    HTML Code:
    <html>
    <head>
    
    </head>
    
    <body>
    Fotos
    </body>
    </html>
    So you will see:

    Fotos

    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:

    HTML Code:
    <html>
    <head>
    
    </head>
    
    <body>
    Fotos<br>
    <a href="javascript: myflowers.loadajaxpage('wirdum.php')">Wirdum</a>
    </body>
    </html>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •