Results 1 to 2 of 2

Thread: passing a resource value as a parameter

  1. #1
    Join Date
    Jun 2005

    passing a resource value as a parameter

    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:

    HTML Code:
    <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:

    HTML Code:
    <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>

  2. #2
    Join Date
    Jun 2005
    I meant to post this in the HTML forum. Can this be moved or should I repost.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles