Page is a not externally linkable
rigaconnect - 9:38 pm on Feb 1, 2013 (gmt 0)
now checking... if it is the only javascript code in file, then ok, but if to add more javascript code, then does not work
I have also this code in file
<script type="text/javascript">
<!-- Username validation
//pass data without page refresh
function ValidateUsername(){
// Create our XMLHttpRequest object
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
var hr = new XMLHttpRequest();
}
else
{// code for IE6, IE5
var hr = new ActiveXObject("Microsoft.XMLHTTP");
}
// Create some variables we need to send to our PHP file
var url = "username-checker.php";
var usn = document.getElementById("username").value;
var vars = "&username="+usn;
hr.open("POST", url, true);
// Set content type header information for sending url encoded variables in the request
hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
// Access the onreadystatechange event for the XMLHttpRequest object
hr.onreadystatechange = function() {
if(hr.readyState == 4 && hr.status == 200) {
var return_data = hr.responseText;
document.getElementById("CheckUsername").innerHTML = return_data;
}
}
// Send the data to PHP now... and wait for response to update the status div
hr.send(vars); // Actually execute the request
document.getElementById("CheckUsername").innerHTML = "processing...";
}
</script>