- Impact
- 13
Hey everyone!
First credits go to ADAM and MATTEW for the basic script all I did to this was made it AJAX.
Demo :
A live demo goes here at my blog http://www.hakc.net/scripts/domainjax/
I've got to add much more to this script so beat at your seats! I'll be adding more web 2.0 features!
Script
The Index file :
The AJAX handler :
Download the complete Package here !
Script is totally free to use modify and use anywhere wanted, but cannot be sold under any circumstances.
-- 3l3ctr1c
First credits go to ADAM and MATTEW for the basic script all I did to this was made it AJAX.
Demo :
A live demo goes here at my blog http://www.hakc.net/scripts/domainjax/
I've got to add much more to this script so beat at your seats! I'll be adding more web 2.0 features!
Script
The Index file :
Code:
<html>
<body>
<head>
<title></title>
</head>
<link href="main.css" rel="stylesheet" />
<script language="javascript" type="text/javascript" src="ajax.js"></script>
<center>
<form method="post" action="./" id="form">
<input type="text" name="domain" />
<br /><br /><input type="submit" value="Check Availability" style="font-size: 10pt;" />
</form>
<div id="loading"><img src="inc/loading.gif"></img></div>
<div id="results"></div>
</center>
</body>
</html>
The AJAX handler :
Code:
var xml = makeXML();
var form;
var loading;
var results;
function makeXML () {
if (typeof XMLHttpRequest == 'undefined') {
objects = Array(
'Microsoft.XmlHttp',
'MSXML2.XmlHttp',
'MSXML2.XmlHttp.3.0',
'MSXML2.XmlHttp.4.0',
'MSXML2.XmlHttp.5.0'
);
for (i = 0; i < objects.length; i++) {
try {
return new ActiveXObject(objects[i]);
} catch (e) {}
}
} else {
return new XMLHttpRequest();
}
}
window.onload = function () {
form = document.getElementById('form');
loading = document.getElementById('loading');
results = document.getElementById('results');
form.onsubmit = function () {
results.style.display = 'none';
results.innerHTML = '';
loading.style.display = 'inline';
xml.open('get', './process.php?domain=' + escape(this.domain.value));
xml.onreadystatechange = function () {
if (xml.readyState == 3 && xml.status == 200) {
results.style.display = 'block';
results.innerHTML = xml.responseText;
loading.style.display = 'none';
}
}
xml.send(null);
return false;
}
}
Download the complete Package here !
Script is totally free to use modify and use anywhere wanted, but cannot be sold under any circumstances.
-- 3l3ctr1c





