In IE I get the error message I told you about earlier, in FF nothing happens, the script just stops. It's completely got me and I can't see a problem anywhere. Here is the whole HTML for the page:
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Admin Control Panel - Settings</title>
<link rel="stylesheet" href="http://www.stuff4web.co.uk/SCMS/skins/basic_skin/style.css" media="screen" type="text/css" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<div id="container">
<div id="header">
<img src="http://www.stuff4web.co.uk/SCMS/skins/basic_skin/images/logo.png" alt="Name of your site" />
</div>
<table width="100%">
<tr valign="top"><td width="175px">
<div id="navigation">
<h3>Main Menu
</h3> • <a href="index.php?p=home">Home</a><br />
• <a href="index.php?p=bbcode">BB Code</a><br />
</div>
</td><td>
<div id="content">
<h1>Admin Control Panel - Settings</h1>
<script type="text/javascript">
var xmlHttp;
function stateChanged() {
if (xmlHttp.readyState==4) {
document.getElementById("mysql_check").innerHTML = xmlHttp.responseText;
}
}
function getXmlHttpObject() {
var xmlHttp = null;
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
return xmlHttp;
}
function mysqlReset() {
document.getElementById("mysql_check").innerHTML = "<input type=\"button\" value=\"Check Connection\" onClick=\"mysqlCheck()\">"
}
function mysqlCheck() {
document.getElementById("mysql_check").innerHTML = "Checking...";
var host = document.getElementById("mysql_host").value;
var user = document.getElementById("mysql_user").value;
var pass = document.getElementById("mysql_pass").value;
var db = document.getElementById("mysql_db").value;
if (host.length==0 || user.length==0 || pass.length==0 || db.length==0) {
alert("Please fill in all fields");
mysqlReset();
return;
}
xmlHttp = getXmlHttpObject;
if (xmlHttp==null) {
alert("Your browser doesn't suppert AJAX which is needed to check your connection");
mysqlReset();
return;
}
var url = "http://www.stuff4web.co.uk/SCMS/admin_check_mysql.php?h="+host+"&u="+user+"&p="+pass+"&d="+db+"&s="+Math.random()*10;
xmlHttp.onreadystatechange = stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
</script>
<p>Below are all the settings for your site. From here you can review them or make edits to them.</p>
<form action="admin_settings.php" method="post">
MySQL Host:<br>
<input type="text" name="mysql_host" value="[REMOVED BY ME]" id="mysql_host" onKeyDown="mysqlReset()"><br><br>
MySQL Username:<br>
<input type="text" name="mysql_user" value="stuff4web" id="mysql_user" onKeyDown="mysqlReset()"><br><br>
MySQL Password:<br>
<input type="password" name="mysql_pass" id="mysql_pass" onKeyDown="mysqlReset()"><br><br>
MySQL Database:<br>
<input type="text" name="mysql_database" value="stuff4web" id="mysql_db" onKeyDown="mysqlReset()">
<span id="mysql_check"></span><br><br>
Base URL of SimpleCMS Folder:<br>
<input type="text" name="baseUrl" value="http://www.stuff4web.co.uk/SCMS/">
</div>
</td></tr>
</table>
</div>
</body>
</html>