Hello.. I have my site on index.html made in html+css., at my index.html i have this div id "content", where you put in main content to the page, and there's a link at the menubar that src to page2.php. When you press on the link it goes to the page2.php, but i want it to display inside the < div "content". In page2 i have Hello this is a test, in a echo..
I dont want to use frames.. should i split up my design on index.php, and then on page2.php include top & footer? or is there another way
function test() {
var xhr = XMLHttpRequest();
xhr.onreadystatechange = function(){
if(xhr.readystate==4 && xhr.status=200)
document.getElementById('content').innerHTML = xhr.responseText;
};
xhr.open("GET", "start.php", false);
xhr.send(null);
}
<a href="start.php" onclick="test(); return false;">Hjem </a> |
<div id="content" ></div>