Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to check h:message id exist or not in JSF  RSS feed

 
Swetha Potluri
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

eg:- <h:message id = "updateMsg'" for="update" 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. Before validating i am resetting the message by

document.getElementById(FormName:updateMsg').innerHTML = '';

Problem:
If i am going to step 2 directly then i am getting JS error that document.getElementById(....) is null or not an object at this line document.getElementById(FormName:updateMsg').innerHTML = '';

So how to check h:message id exist or not in JSF

please provide some solutions

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!