Hi All,
Can anyone suggest how to pass a jsp variable to a javascript function
correctly? It is in a nested:iterate block that has an indexId="tmpIndex".
what I would like to do is to have the 'y<%=tmpIndex%>' variable pass
into my JavaScript function.It seems like the server side <%=tmpIndex%>
variable can not be translated into the client side script function.
Here is my code:
<nested:iterate property="projectList" id="pro" indexId="proIdx">
<bean:define id="tmpIndex" value="<%=
String.valueOf(proIdx.intValue())%>"/>
<script language='JavaScript'>
var y<%=tmpIndex%>=<%=tmpIndex%>;
</script>
<nested:select property="projectCodeId" onchange=" projectChange(y<%=tmpIndex%>)">
<nested:optionsCollection property="../projectCodeList"/>
</nested:select>
</nested:iterate>
any suggestions?
Very Appreciated.
Julie
= = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = =
This transmittal and any attachments may contain confidential, privileged or sensitive
information and is solely for the use of the intended recipient. If you are not
intended recipient, you are hereby notified that you have received this transmittal
and any such attachments in error and any review, dissemination, distribution or
copying thereof is strictly prohibited. If you have received this transmittal and any
attachments in error please notify the sender and immediately destroy the message and
all its attachments. Any opinions herein expressed may be those of the author and not
necessarily of Mizuho Corporate Bank, Ltd (the "Bank"). The Bank accepts no
responsibility for the accuracy or completeness of any information herein contained.
= = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = =