View Single Post
Old 08-09-2007, 12:22 AM   #5 (permalink)
markster
Code Monkey
 
markster's Avatar
 
Join Date: Jun 2006
Posts: 65
markster is on a distinguished road
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>&nbsp;&nbsp;&bull;&nbsp;<a href="index.php?p=home">Home</a><br />
&nbsp;&nbsp;&bull;&nbsp;<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>
__________________
Stuff4Web.co.uk - The ultimate resource for webmasters

50% off all orders £1-£50! Just enter the code AGSIG01 at the checkout! Offer ends: 01/09/2008

Last edited by markster; 08-09-2007 at 12:23 AM. Reason: Spelling error
markster is offline   Reply With Quote