View Single Post
Old 08-27-2012, 11:14 PM   PM User | #3
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
How about a different approach?


Code:
$(document).ready(function() {
	//$('#Loading').hide(); you can use plain ole css to hide this by default, but re add it if you prefer.

$("#User_Nick").blur(function(e){
$('#Loading').show();
$.post("check_username_availablity.php", {
		username: $(this').val(),
	}, function(response){
		$('#Info').fadeOut();
		 $('#Loading').hide();
		setTimeout("finishAjax('Info', '"+escape(response)+"')", 450);
	});
})



});

//Finish Ajax Function
function finishAjax(id, response){
 
  $('#'+id).html(unescape(response));
  $('#'+id).fadeIn(1000);
}
also you can remove onblur="return check_username();"

- also how are you showing the actual pop up?
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users

Last edited by DanInMa; 08-27-2012 at 11:16 PM..
DanInMa is offline   Reply With Quote