You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anjishnu Bandyopadhyay <an...@infosys.com> on 2005/09/08 09:36:50 UTC
how to pass value defined in a "nested:define" to a java script function?
Hi all,
I have a <nested:iterate> tag within another <nested:iterate> tag.
<nested:iterate property=".." id="..">
< nested:define id="year" value=".."/>
<nested:text property=".." value="<%= year %>"/>
<nested:iterate property=".." id="..">
<nested:text property=".. " onchange="calc(<%= year
%>) "/>
</nested:iterate>
</nested:iterate>
Here, on change of the text box in the inner <nested:iterate>, I want to
send some value to a java script function, that is available from a
<nested:define>/ <bean:define> value.
But, I am not being able to do so. Some syntax error is coming.
Thanks for your time.
With best regards,
Anjishnu.
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
Re: how to pass value defined in a "nested:define" to a java script
function?
Posted by Laurie Harper <la...@holoweb.net>.
Anjishnu Bandyopadhyay wrote:
> I have a <nested:iterate> tag within another <nested:iterate> tag.
>
> <nested:iterate property=".." id="..">
> < nested:define id="year" value=".."/>
> <nested:text property=".." value="<%= year %>"/>
> <nested:iterate property=".." id="..">
> <nested:text property=".. " onchange="calc(<%= year
> %>) "/>
> </nested:iterate>
> </nested:iterate>
>
> Here, on change of the text box in the inner <nested:iterate>, I want to
> send some value to a java script function, that is available from a
> <nested:define>/ <bean:define> value.
>
> But, I am not being able to do so. Some syntax error is coming.
OK, what syntax error? My guess would be that you need to change your
onchange attribute to
onchange='<%= "calc(" + year + ")" %>'
If that's not the problem, post the error you're getting.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org