Jquery AJAX

hi please suggest me how do i found the duplicate user name using AJAX and jquery…i want to find these values duplicate while im clicking availablity link…
please help me with example script…

$(document).ready(function(){
var fname = $(‘#txtusername’).attr(‘value’);
$(“#check”).load(“checkUsername.php?fname=”+fname,function() {

//var lname     = $('#lname').attr('value');
	$.ajax({
		type: "GET",
		url: "checkUsername.php",
		data: "fname="+ fname,
		success: function(){
			//	$('#check').hide(function(){$('#check').html();});
		}
	});
return false;
});

});

i have this code whenever i click checkavailablity link then control goes to checkUsername page and returns the result

What code do you have so far?

$(document).ready(function(){
var fname = $(‘#txtusername’).attr(‘value’);
$(“#check”).load(“checkUsername.php?fname=”+fname,function() {

//var lname = $(‘#lname’).attr(‘value’);
$.ajax({
type: “GET”,
url: “checkUsername.php”,
data: “fname=”+ fname,
success: function(){
// $(‘#check’).hide(function(){$(‘#check’).html();});
}
});
return false;
});
});

i have this code whenever i click checkavailablity link then control goes to checkUsername page and returns the result