Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: SSI Linking

  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SSI Linking

    I have a div container that has a include in it. What i want to do is change the file of the include when someone clicks different links. ie: link1 -> include1 shows up, link2 -> include2 replaces include1. How do I script that?

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    What language do you plan on using? HTML won't do it, at least not in the way you're describing, as it's just a markup language.

  • #3
    New Coder
    Join Date
    Jul 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i want to preferably use php

  • #4
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    I'll move it to that forum for you.

  • #5
    New to the CF scene
    Join Date
    Mar 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actual, you can't do this with PHP.
    To load a file into a DIV it is required to reload the entire page.
    So I guess, you are wrong here

    I would suggest to use either IFRAMES (back to HTML Forum) or AJAX, until you do not want the entire page to be reloaded on each click.

  • #6
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Well, he didn't say the page couldn't reload. I'm no PHP expert, so I'm reluctant to chime in, but I'd say a simple way would be just assign the links values using in the URLs, i.e. index.php?page=contact, then use $_GET to pull the right include file.

  • #7
    New to the CF scene
    Join Date
    Mar 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah, for example, you can do it this way. I thought he just wanted to reaload the DIV :S


  •  

    Posting Permissions

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