Hi Friend!
I am unable to give you codes since I haven't practiced it for so long...
but I can help you in the way that I can generally explain the basics of how can it be implemented....
In AJAX (Asynchronous JavaScript and XML), we send a request to load a partial piece of data. and use it as required.
Now here, you simply take the value from textbox either on onblur() event or onkeyup() event and post the string ie Textbox.Text to a processor.asp page.
Here, simply compare this string with all the entries present in the database.
If you found the string, return false otherwise, return true
use this data, to print a text, "Username available" or "Username not available"
You can also change the submit button's enable state to false if username is not available. :-)
I have a piece of code, I had written it for one of my PHP based website, but since it is javascript code, so maybe it can be of some help to you.... :)
function chkmatch(str)
{
var test = document.frm.password.value;
if(str!="")
{
if(test==str)
{
document.getElementById("getmatch").innerHTML = "<font color="green">Password Matched</font>";
document.frm.register.enable = true;
}
else
{
document.getElementById("getmatch").innerHTML = "<font color="red">Password Didn't Matched</font>";
document.frm.register.enable = false;
}
}
else
{
document.getElementById("getmatch").innerHTML = "";
document.frm.register.enable = false;
}
}