But as JSF has its own convention of generating ids, the id cannot be determined unless we use forceId="true" as an attribute as in the example below
<h:inputTextarea id="questiondesc" forceId="true" ....more attributes here
As this text area is within a form whose id is qtype
<h:form name="qtype" id="qtype" enctype="multipart/form-data">
we have to refer it in JavaScript as below.var tarea=document.getElementById("qtype:questiondesc");