Hi Bernie, I thought I'd replied but it looks like my post was held back for moderation for whatever reason? :/
I tried it with the following code and had no joy:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<title>my site</title>
<script type="text/javascript">
function updateContent(page){
document.getElementById('content').innerHTML = "test";
}
var countries=new ddajaxtabs("countrytabs", "content")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
</script>
</head>
<body>
<script src="jquery.js"></script>
<div id="wrapper">
<div id="content">
content
<hr>
test
<?php
echo "Test";
?>
</div> <!-- end #content -->
<div id="sidebar">
<div id="fixed">
<ul id="countrytabs">
<li><a href="#" class="selected" rel="#default">Tab 1</a></li>
<li><a href="home.php" rel="content">Tab 2</a></li>
<li><a href="about.php" rel="content">Tab 3</a></li>
</ul>
<br />
my shoutbox will go here
</div>
</div> <!-- end #sidebar -->
</div> <!-- End #wrapper -->
</body>
</html>
And then it wasn't until I found this code snippet:
Code:
<DOCTYPE html>
<html>
<head>
<title>Example</title>
<meta charset="UTF-8"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script>
$(function() {
$("#Menu > li a").each(function() {
var self = $(this);
var href = self.attr("href");
self.attr("href", "javascript: void(0);");
self.click(function() {
$("#Contents").load(href);
});
});
});
</script>
</head>
<body>
<h1>Select!</h1>
<ul id="Menu">
<li><a href="showInfo.php?id=1">First</a></li>
<li><a href="showInfo.php?id=2">Second</a></li>
<li><a href="showInfo.php?id=3">Third</a></li>
</ul>
<div id="Contents"></div>
</body>
</html>
That I realised I'd left out
Code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
I guess I should definitely learn how to use Ajax then if I want to do anything useful in the web development world?
Bookmarks