PW@%3 AQt@0A)@0AF@PW@n3(@#A>9_3 LY3%3_3 _3HTTP_HOSTadysta(9pY3pY3=3 req.open("GET", url, true); req.send(); } } } function processReqChange() { // only if req shows "complete" if (req.readyState == 4) { // only if "OK" if (req.status == 200) { // ...processing statements go here... response = req.responseXML.documentElement; method = response.getElementsByTagName('method')[0].firstChild.data; result = response.getElementsByTagName('result')[0].firstChild.data; eval(method + '(\'\', result)'); } } } function checkEmail(input, response) { if (response != ''){ // Response mode if (response == 'invalid'){ document.getElementById("emailCheck").innerHTML = "
Warning: email appears to be invalid.
"; }else{ document.getElementById("emailCheck").innerHTML = "
" + response + "
"; } }else{ // Input mode document.getElementById("emailCheck").innerHTML = "
Checking email address...
"; url = 'http://bokehman.satellites-xml.org/xml_validate.php?checkEmail=' + input; loadXMLDoc(url); } } function clearSpan(){ document.getElementById("emailCheck").innerHTML = ""; } //--> Validating email with the XMLHttpRequest object

Example of email validation using the XmlHttpRequest object. The email address is validated in real time as a background operation while the client continues to fill out the form without any page reload. The email validation is conducted by a PHP script which connects to and interogates the remote mail server. Give it a try. Enter an email address in the first box then tab to the second box. In a real application only the warning is necessary so if the email returns valid do nothing.

Enter an email

Now tab here