struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Rodrigues <feliperod...@yahoo.com.br>
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.

Regards,

Felipe


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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-S2--Newbie-Passing-S2-variables-to-javascript-functions-tf3658057.html#a10222285
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message