Hi,

I'm forced to use a scriptlet to insert a localized label into a tag.
The code is this ;
(Note : this code is changing a button display by an image, defined in the css file. )

<bean:define id="labelPrinterButton" >
               <fmt:message key="button.printerFriendly" />
</bean:define>
<html:submit property="button" value=" " onclick="this.value='<%=labelPrinterButton%>'" styleClass="buttonPrinter" title="<%=labelPrinterButton%>" alt="<%=labelPrinterButton%>"/> only the last two <%=labelPrinterButton%> scriptlet out of the three are evaluated. The first one is not. This drive me nuts. Of course, since the "this.value" is is not something displayed, I can put in there any string. But I just wonder why the scriptlet in there is not evaluated.

the result html page is :

<input name="button" value=" " onclick="this.value='<%=labelPrinterButton%>'" class="buttonPrinter" 
title="Printable version" alt="Printable version" type="submit">


OTOH, removing the "this.value" correct the problem, but this is not what I 
want                              
                                

<html:submit property="button" value=" " onclick="<%=anotherVariable%>'" styleClass="buttonPrinter" title="<%=labelPrinterButton%>" alt="<%=labelPrinterButton%>"/>

In that case the three scriptlets are correctly evaluated.
Thanks for your help.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to