-
Help needed :(
Ok, I have a layout in tables but I want to know how I can make it stay expanding but open the links on the nav so that the links open in the main content.. As when I normally link them without using iframes it refreshed the whole page meaning my radio will keep refreshing.
Examples:
Clubhabbo.net
Thinkhabbo.com
etc etc
+rep if you help ;]]
-
Use PHP nav links. http://techtuts.com
-
index.php?page=whatever
That one?
-
-
Doesn't work for me, just opens the link in a blank page doesn't go in the content box.. Doesn't even include the text in the white page :S
-
shame techtuts got hacked lmaoo
-
-
i've sorted this anyway thanks chris
-
Both of your examples use IFrames, and using PHP to get content depending on the URL will still cause the page to refresh (as PHP is a server-side language). To load content into a DIV (without the page refreshing), you'll need to use JavaScript.
HTML Code:
<html>
<head>
<title></title>
<script>
<!--
try {
var request = new XMLHttpRequest();
} catch(e) {
var request = new ActiveXObject('Microsoft.XMLHTTP');
}
function loadPage(page) {
request.open('get', page);
request.onreadystatechange = function () {
if(request.readyState == 4) document.getElementById('content').innerHTML = request.responseText;
}
request.send(null);
}
-->
</script>
</head>
<body>
<a href="#" onclick="loadPage('news.htm');">News</a>
<div id="content"></div>
</body>
</html>
-
Where do I insert that? In the index where the table is?