I have this java script code which is call on page page by jquery
<script>
function initReportExplr() {
alert(jQuery('#inputValues').val());
}
$(document).ready(function() {
initReportExplr();
});
</script>
and this is component i am using
<h:inputText id="inputValues" value="#{reportsBean.birtServerInformation}"/>
and inside get method i am initializing variable
public String getBirtServerInformation() {
StringBuilder birtInfo = new StringBuilder();
birtInfo.append(Constants.BIRT_SERVER_URL);
birtInfo.append(",");
birtInfo.append(Constants.BIRT_SERVER_PORT);
birtInfo.append(",");
birtInfo.append(Constants.BIRT_USER_NAME);
birtInfo.append(",");
birtInfo.append(Constants.BIRT_PASSWORD);
birtServerInformation = birtInfo.toString();
return birtServerInformation;
}
But i am getting undefined
when trying to print the value by this code alert(jQuery('#inputValues').val());