Hi Max,
Following is the jsp file.
<%
String strValue;
%>
<hbj:content id="myContext">
<hbj:page title="title" >
<hbj:form id="form">
<hbj:inputField
id="txtValue"
type="STRING"
maxlength="10"
value=""
width="100"
design="STANDARD"
>
<%
strValue=myContext.getParamIdForComponent(txtValue);
%>
</hbj:inputField>
<hbj:button
id="button"
text="Validate"
onClientClick="callMe()"
>
</hbj:button>
</hbj:form>
<SCRIPT LANGUAGE="Javascript">
function callMe()
{
alert("Inside javascript function.Value is ="+document.getElementById('<%=strValue%>').value);
}
</SCRIPT>
</hbj:page>
</hbj:content>
Add a comment