03-22-2007, 12:14 AM
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?
03-22-2007, 12:43 AM
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.
03-22-2007, 01:21 AM
i want to preferably use php
03-22-2007, 01:30 AM
I'll move it to that forum for you.
03-22-2007, 01:36 AM
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 :D
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.
03-22-2007, 05:31 AM
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.
03-22-2007, 06:13 AM
Yeah, for example, you can do it this way. I thought he just wanted to reaload the DIV :S