Data Cache Problem
Facing one major problem related to cache.
I have User Creation form in that , if i put value which is already used in textfield then it does 开发者_如何学JAVAnot shows "Check Availability" hyper link. but if i put new text then it show hyper link on change of textfield value event.
Code is written in Jquery. I think it's issue of data cache .What is the solution.
If i clear all data from Tool >> Internet Option then it works fine first time Here is the code
$('#userName').change(function(){
if($('#userName').val()!= BLANK_STRING){
$('#checkUser').show();
}else{
$('#checkUser').hide();
}
$('#avilabilityMsg').html('');
});
Please help?
This might be best suited for the keyup event.
$(function(){
var userName=$('#userName'), checkUser=$('#checkUser');
userName.keyup(function(e){
checkUser[($(this).val()===BLANK_STRING ? 'hide' : 'show')]();
});
});
精彩评论