This is a test of a script for displaying a forum thread on the home page using XHR javascript
If XHR is not supported normal forum should load
And then this
<script>
var thisPath = window.location.pathname;
// Adjust path to suit
if (thisPath == "/" || thisPath == "/index" && typeof ( new XMLHttpRequest())!=undefined){
// Change this for your own url
newPath = "/index/__xt/test/thread-oon8wg4ki2cqrt9e1bcdih8qa4ec2wkln9y1.html";
function loadContent(){
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function(){
if (this.readyState == 4 && this.status == 200){
var content=this.responseText.split("<!--content-->");
document.getElementById("content").innerHTML = content[1];
document.getElementById("content").style.display = "block";}}
xhttp.open("GET", newPath, true);
xhttp.send();}
loadContent();}
else{
document.getElementById("content").style.display = "block";}
</script>
Copy code
var thisPath = window.location.pathname;
// Adjust path to suit
if (thisPath == "/" || thisPath == "/index" && typeof ( new XMLHttpRequest())!=undefined){
// Change this for your own url
newPath = "/index/__xt/test/thread-oon8wg4ki2cqrt9e1bcdih8qa4ec2wkln9y1.html";
function loadContent(){
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function(){
if (this.readyState == 4 && this.status == 200){
var content=this.responseText.split("<!--content-->");
document.getElementById("content").innerHTML = content[1];
document.getElementById("content").style.display = "block";}}
xhttp.open("GET", newPath, true);
xhttp.send();}
loadContent();}
else{
document.getElementById("content").style.display = "block";}
</script>
Copy code
Online:
Guests: 1