How can I pass the value of a resource to a function? I want to use a resource value as a parameter to the textCounter function similar to the way I’m using it for the input tag. The JSP code follows:
[code=html]<TR><TD> <input name=busPurposeLen type=text
value=” <bean:message key=”textarea.maxchar” /> ” size=3 maxlength=3 readonly> characters available</TD></TR>
<TR><TD><html:textarea property=”businessPurpose” cols=”82″ rows=”4″
onkeydown=’textCounter(this.form.businessPurpose, this.form.busPurposeLen, <bean:message key=”textarea.maxchar”/>)’
onkeyup=’textCounter(this.form.businessPurpose, this.form.busPurposeLen, <bean:message key=”textarea.maxchar”/>)’ /><BR><BR></TD>
What I’m getting in the generated HTML is the tag reference instead of its value. This is causing a syntax error when the Web page is displayed. The source HTML is the following:
[code=html]<TD><textarea name=”businessPurpose” cols=”82″ rows=”4″ onkeydown=”textCounter(this.form.businessPurpose, this.form.busPurposeLen, <bean:message key=”textarea.maxchar”/>)” onkeyup=”textCounter(this.form.businessPurpose, this.form.busPurposeLen, <bean:message key=”textarea.maxchar”/>)”></textarea><BR><BR></TD>
Thanks,
Tom