Then reload the page again all error message will be gone.
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Joined: May 21, 2012
May I know how to reload the page...............
This might be a silly question but I really don't know...
Dipali yadav wrote:Hi,
when I click on reset button, it resets only fields but I want that it should reset error messages as well from the page.
Please help me out for this.
This is what a <input type="reset"> button does. It will only reset the form fields.
So what you need to do:
- Create a <input type="button" onclick="someFunction" value="Reset"/>
a) reset the error messages
b) document.forms.reset(); // this is just like the reset button
how you do b) is clear, how you do a):
- When you render the page, put all your error messages wrapped in some tags that can be easily found in the DOM like
<span class="errorhere">error message</span>
not sure about the syntax, but something like that: