Even mijn post daar c/p'en

Hopelijk schept dat wat duidelijkheid ..
Hi,
I'm working on a site, and I wanted to use Ajax in my navigation .. so when someone clicks a link, the main content changes, without really being refreshed ..
I had several plans, but they all failed :
1) iframe, and with ajax rewrite the src -> works, but because the src of iframe changes, the page in frame still looks "postbacked" ( and you also hear the "click" )
2) div, and rewrite the innerHTML with a big string -> also works, but I can't do that for every page, I have too many and some pages with lot of scripts are complicated to put in a string, and often the scripts don't work anymore ..
3) make a bunch of divs, each with an include and display/hide the div whenever needed -> works, but when someone goes from logged out to logged in, some pages need different content, which doesn't work this way
4) again div, but now rewrite the include, still no avail ..
Now I bet someone will probably post a very simple solution ..It kept me busy all day, but now I'm sick of it .. I want it to work
Is there an other better way ? Or did I do something wrong .. ?
***EDIT***
After some forum reading, I tried the method with ob_start(); ..
This works for a simple htm page, but when I try it with a php page, he has trouble with this line :
<?php $xajax->printJavascript('inc/xajax/'); ?>
without it, it displays the page, with, it gives error .. But I can't do it without .. so I need that printJavascript ..
So what I tried then, was to look in the source of the page, to see what that printJavascript actually does en what it writes .. After doing that, I just took the output code and put it in my head "manually" ..
This is that code :
<script type="text/javascript">
var xajaxRequestUri="registerServer.inc.php";
var xajaxDebug=false;
var xajaxStatusMessages=false;
var xajaxWaitCursor=true;
var xajaxDefinedGet=0;
var xajaxDefinedPost=1;
function xajax_processForm(){return xajax.call("processForm", arguments, 1);}
function xajax_createCapcha(){return xajax.call("createCapcha", arguments, 1);}
</script>
<script type="text/javascript" src="inc/xajax/xajax_js/xajax.js"></script>
Now the page would display perfectly, but as soon as I try to do a function, it errors ..
If I load the page seperatly it runs just fine, but when I access it from that div it was written in, it doesn't work anymore ..
Last edited by vodde (Today 5:37:53 AM)