Results 1 to 3 of 3

Thread: Loading .php into <div>

  1. #1
    Join Date
    Sep 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Loading .php into <div>

    I was using a script which I had gotten from this site. It uses "ajaxpage" to load pages into a <Div> tag. I have no problem loading the css with the loadobjects function or loading html into the divs. thats fine. It won't load a .php into the div though. any info? Can div's not hold .php.
    If I just type in the address of the php it comes up as a page. So it definitly works.

  2. #2
    Join Date
    Sep 2006
    Location
    Eureka, California
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    Hello,

    I have used this for my site www.ChristianBlog.com and it's work rather well.


    Here is what I am using for your review:

    PHP Code:
    <link rel="stylesheet" type="text/css" href="ajaxtabs.css" />
    <script type="text/javascript" src="ajaxtabs.js"></script>
    <ul id="maintab" class="shadetabs">
        <li <?php if($tabme == '') { echo 'class="selected"';};?>><a href="#default" rel="ajaxcontentarea">Profile</a></li>
        <li <?php if($tabme == 'friends') { echo 'class="selected"';};?>><a href="bio_myfriends.php?uid=<?=$uid;?>" rel="ajaxcontentarea">Friends</a></li>
        <li <?php if($tabme == 'blogs') { echo 'class="selected"';};?>><a href="bio_myblogarchive.php?uid=<?=$uid;?>" rel="ajaxcontentarea">Blogs</a></li>
        <li <?php if($tabme == 'surveys') { echo 'class="selected"';};?>><a href="bio_mysurveys.php?uid=<?=$uid;?>" rel="ajaxcontentarea">Surveys</a></li>
        <li <?php if($tabme == 'gallery') { echo 'class="selected"';};?>><a href="bio_mygallery.php?uid=<?=$uid;?>" rel="ajaxcontentarea">Gallery</a></li>
        <li <?php if($tabme == 'shoutouts') { echo 'class="selected"';};?>><a href="bio_myshoutouts.php?uid=<?=$uid;?>" rel="ajaxcontentarea">Shout-outs</a></li>
    </ul>
    <div id="ajaxcontentarea" class="contentstyle">
        some default text should go here... whever you want the "profile" tab listed first to display
    </div>
    <script type="text/javascript">
    startajaxtabs("maintab")
    </script>
    You can see this in-action at: http://www.christianblog.com/bio/abelajohnb/

    note my use to be able to pre-select a specific tab, via:

    PHP Code:
    <li <?php if($tabme == 'shoutouts') { echo 'class="selected"';};?>>
    That allows you to link to a specific tab, such as:

    http://www.christianblog.com/bio/abelajohnb/gallery/

    (I am using SEO url's, so your uri's might be slighly different)

    Hope this helps!

  3. #3
    Join Date
    Sep 2006
    Location
    Eureka, California
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So did this help you at all?

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
  •