I'm a former (avid) user of ASP - I love it - but I've decided for certain reasons to go ahead and use a linux based server for my website. I haven't even started building my site yet and I'm already pulling my hair out trying to do something that is remarkably simple to do with ASP - Load a constant navigation bar.
Basically my goal is to have a template page - a single layout - that will dynamically load content I create in a separate page. For example;
index.html will load "navi.html" into the div marked "navigation", load "banner.html" into the div marked "banner", etc... So when a user clicks a link it doesnt refresh the entire page, but changes the content in the "main" div. With ASP this is remarkably simple, however so far in my research the best method I've come up with is using jQuery to load html into divs - only problem is it isn't working for me and I don't know nor can I find why.
Here's the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ace8i</title>
</head>
<body>
<div id="navigation">
nav div tag is here
</div>
<p onclick="">test</p>
<script type="text/javascript" src="js/jquery.js">
$(document).ready(function(){
$('#navigation').load('navi.html');
});
</script>
</body>
</html>
I've created it basically exactly as I've seen it done in three other posts I've found online, and I've tried it in the head and in the body. I've also tried the load function wrapped in and without the document.ready function. No errors, just no navigation bar.