Click here to Skip to main content
16,012,166 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
<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>


Sorry for inconvinence,,
Actly i want to check the availability of Username on the onBlur Event of TextBox..
I wrote that script in aspx But it does not provide the availability onBlur Event.
What should i do..
Posted
Updated 19-Jan-10 23:58pm
v5

1 solution

Adding an answer to get this out of the unanswered list. The OP never managed to ask a clear question, but he says he's solved his issue
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900