开发者

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')]();
  });
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜