| CODE:<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
 <link rel="stylesheet" href="body0000.css" type="text/css">
 <script type='text/javascript'>
 var req;
 var respon='';
 function loadXMLDoc(url) {
 // branch for native XMLHttpRequest object
 if (window.XMLHttpRequest) {
 req = new XMLHttpRequest();
 req.onreadystatechange = processReqChange;
 req.open("GET", url, true);
 req.send(null);
 // branch for IE/Windows ActiveX version
 } else if (window.ActiveXObject) {
 req = new ActiveXObject("Microsoft.XMLHTTP");
 if (req) {
 req.onreadystatechange = processReqChange;
 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;
 respon = response.getElementsByTagName('result')[0].firstChild.data;
 result = response.getElementsByTagName('result')[0].firstChild.data;
 
 eval(method + '(\'\', result)');
 } else {
 alert("There was a problem retrieving the XML data:\n" + req.statusText);
 }
 }
 }
 function checkName(input)
 {
 if (respon != ''){
 // Response mode
 message   = document.getElementById('nameCheckFailed');
 if (respon == 1){
 message.className = 'error';
 }else{
 message.className = 'hidden';
 }
 respon = '';
 }else{
 // Input mode
 url  = './checkUserName.php?q=' + input;
 loadXMLDoc(url);
 }
 
 }
 </script>
 </head>
 <body bgcolor="#FFFFFF" text="#000000" style="margin:0px;" marginwidth=0 marginheight=0>
 <FORM ACTION="./out.php" METHOD="post" name="outform">
 <input id="username" name="username" type="text" onblur="checkName(this.value)">
 <span class="hidden" id="nameCheckFailed">
 This name is in use, please try another.
 </span>
 <BR><INPUT TYPE="SUBMIT" SIZE="70" NAME="out" VALUE="Âûäàòü">   <input type="reset" value="î÷èñòèòü">
 </FORM>
 </body>
 </html>
 
 проблема решена.
 |