I have a JSF output text as shown below:
<h:outputText id="totalCount" value="#{myBean.totalCount}" />
And within my javascript- which is being called from a h:selectOneMenu, I am trying to calculate the count and set it.
var total = <some calculation is done>;
document.getElementById("myForm:totalCount").value=total;
I verified that the value was being set by adding an alert, but this was not reflecting in the page. Further noticed that outputtext was being rendered as a SPAN HTML tag.
So, will it not work in a Javascipt? Any suggestions?
Thanks for anyone who can help me.