<script type="text/javascript"> var _txtemailID; var _divStatus; var _timeHandler; function pageLoad() { _txtemailID=document.getElementById("<%=txtemailIID.ClientID %>"); _divStatus=document.getElementById("<%=divStatus.ClientID %>") } function pageUnload() { $removeHandler(_txtemailID,"keyup",onKeyUp); cleartimer(); } function onKeyUp(e) { setupTimer(); } function setupTimer() { clearTimer(); _timeHandler=window.setTimeout(checkEmail,15000); } function clearTimer() { window.setTimeout(_timeHandler); _timeHandler=null; } function checkEmail() { if(_txtemailID.value.lenght>5) { _divStatus.innerHTML='Checking...'; _divStatus.style.color='black'; PageMethods.checkEmailID(_txtemailID.value,onCheckEmailComplete,onCheckEmailError,_txtemailID.value); } else { _divStatus.innerHTML=' '; } } function onCheckEmailComplete(result,usercontext) { if(result==true) { _divStatus.innerHTML=String.fomat('\'{0}\'\ is Alredy Taken',usercontext); _divStatus.style.color='red'; } else { _divStatus.innerHTML=String.fomat('\'{0}\'\ is Available',usercontext); _divStatus.style.color='green'; } } function onCheckEmailError(e) { _divStatus.innerHTML = e.get_message(); _divStatus.style.color = 'red'; } </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)