struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Rodrigues <>
Subject Re: [S2] Newbie Passing S2 variables to javascript functions
Date Fri, 27 Apr 2007 16:37:40 GMT

Once you've setted this var, you can use Plain Old EL to get it.
${indexValue} should work .

A good pratice in this case is define the scope you're setting this var.



Roger Varley wrote:
> Hi
> Within a <s:iterator> tag I have the following statement <s:set
> name="indexValue" value="#status.index"/> (because status seems to
> disappear when the iterator exits) and I use the expression
> %{#indexValue} within other struts s: tags without a problem.
> I now need to pass this value to a javascript function i.e
> onclick="enableField(%{#indexValue})" but the browser complains about
> invalid syntax. How do I pass the value "indexValue" to a javascript
> function?
> Regards
> Roger
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message