Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to reset jsf message in javascript with out rendring the request

831844Jan 17 2011 — edited Jan 18 2011
Hi,

i have a <h:message> for a text box.

eg:- <h:message id = "success" for="stopProfileForm:editStopProfileSubView:lastChangedEmp" styleClass="success"></h:message>

Step1: In success scenario i am displaying success message for that text box

Step2: After the success Step1, Now i am giving a wrong value in the text box.It is getting validated by a javascript.

Problem:
After validation still jsf message is getting displayed on the screen. (since the page is not getting reloaded)
I dont want that message to be displayed after javascript validation with out reloading the page.

i tried by using
document.getElementById('success').reset();
document.getElementById('success').innerHTML = '';
document.getElementById('success').value = '';

but in all these cases request is hitting. that i dont want!

pls provide some solutions

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2011
Added on Jan 17 2011
1 comment
808 views