Another problem is that the script that loads content based on the fragment identifier:
Code:
if ((window.location.href.split("#", 2)[1] == null)
|| (window.location.href.split("#", 2)[1] == "")
|| (window.location.href.split("#", 2)[1] == "index"))
{
sendRequest("../index2.php");
} else {
sendRequest(window.location.href.split("#", 2)[1] + ".php");
}
loads a relative URL, which means (eg) http://www.playminigames.co.cc/test/index.php#games tries to load http://www.playminigames.co.cc/test/games.php, which doesn't exist.
Performance note: the 4 identical calls to split is wasteful. You could use a variable, a switch or drop the call entirely because the Location object has a 'hash' property that holds the fragment identifier, including the '#':
Code:
switch (window.location.hash.toLowerCase()) {
case '': // FALLTHRU
case '#': // FALLTHRU
case '#index':
sendRequest("../index2.php");
break;
default:
sendRequest('../' + window.location.hash.substring(1) + ".php");
break;
}
I'm a little concerned that your script is replacing its parent, which isn't fully defined. The technique works on Safari 4, but may not work on other browsers, as elements may not be added to the document until fully processed (i.e. the end tag is encountered).