• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How to remove an error message on entering an input element.

 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have an input element and I want to remove the .error class (to remove the error formatting) and also remove the error message when I click into the input field so I can enter the correct information.

My input field is:

My css is:


My attempt is:


I have attached an image of the error message and the result when I click into the input box.

Kind regards,

Glyn
Before.PNG
[Thumbnail for Before.PNG]
After.PNG
[Thumbnail for After.PNG]
 
Saloon Keeper
Posts: 28706
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the reasons I like JavaServer Faces. All that stuff is readily available already as part of the JSF framework I use.

However, if you prefer the hard way, commonly one keeps the error block, but makes it hidden when there is no actual error.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic