HTML
<head>
<script src=site.js type=text/javascript></script>
<object id=obj classid=classid:? type=text/html data=about_data.php>
object is added via javascript, classid is used only when in ie
</object>
</head>
<body>
<div id=nav>bunch of anchors that use the onclick event to cancel the link and load object</div>
<div id=content>where content of obj is copied to</div>
</body>
JavaScript
var get = {};
function site () { // used at window.load
site.get = function () {}; // load location.search into global get
site.get.id = document.getElementById;
// I actually use typeof to detect this or document.all else create a function that returns null always
}
site.ajax = function () {
var r = "";
// attempt xhr
// if fail use obj
// if still fail use iframe
// if still fail do nothing with r else r grabs content of xhr / obj / iframe as string
return r;
};
site.nav = function () {
var a = arguments[0];
x = site.ajax(a.href);
if (x !== "") {
e = site.get.id("content");
if (e !== null) {
e.innerHTML = x;
return false;
}
} return true;
};
This is highly simplified skipping a great deal of code. The point of the site.nav is to use ajax if it can otherwise let php handle it. The point in using anchors is to allow the site to be used even if there is no javascript (applied this rule to css as well).
The current location where I upload is wdaisy.cz.cc (not updated yet). This is for a friend so don't go assuming I got weird tastes for a guy.