-3

I am using jQuery validation engine on a Textbox for Validation. When a user clicks submit without actually submitting data, an error shows up. The problem is that if a user accidently clicks on that textbox and then clicks on any other place on the site an error shows and remains showing until the users refreshs the page. I am using ASP.net MVC 3.

Can anyone show me the way to let the error disappear after 10 seconds?

j0k
  • 22,600
  • 28
  • 79
  • 90
Ahsan Attari
  • 987
  • 3
  • 12
  • 26
  • can you post some code so we can see how you're currently implementing it? To make something disappear after 10 seconds, you would probably want to create a setTimeout or setInterval. – hellatan Jun 18 '11 at 13:09

1 Answers1

1

i didnt understand your problem much but you can do this

jQuery('.text-box').bind('blur',function(){
          var e=$(this);
          window.setTimeout(function(){
                e.closest('.field-validation-error').hide();
          },10000);
});
Praveen Prasad
  • 31,561
  • 18
  • 73
  • 106