Hello, I'm creating an AJAX driven site, and I have a problem... I need to have an "live" url, wich isn'c case in my simple code... I need it, because i will need to use mod_rewrite later (client's request).
Here's what I've got so far:
PHP Code:
function loadPage(page) { if (page == "" || page == null) page = "home.php"; var xmlHttp; try { xmlHttp=new XMLHttpRequest(); } catch (e) { try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { document.getElementById("main-content-container").innerHTML = xmlHttp.responseText; } } xmlHttp.open("GET","content/" + page,true); xmlHttp.send(null); }
Then I load content with "<a href='javascript :loadPage("example.php")'>test</a> " wich works just fine, but i cann't use method POST with this (or at least don't know how)... So there are multiple problems, and any help would be appriciated...
Thanks in advance
|