HI Julie

Try putting single quotes around your variable ...

Eg:

<nested:select property="projectCodeId" onchange=" projectChange('y<%=tmpIndex%>')">

regards
Rohit


Adam
[EMAIL PROTECTED] wrote:
> 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.
> = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = > 
> 


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



*----------
This message and any attachment(s) is intended only for the use of the addressee(s) 
and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the 
intended addressee(s), you are hereby notified that any use, distribution, disclosure 
or copying of this communication is strictly prohibited. If you have received this 
communication in error, please erase all copies of the message and its attachment(s) 
and notify the sender or Kanbay postmaster immediately.

Any views expressed in this message are those of the individual sender and not of 
Kanbay.

Although we have taken steps to ensure that this e-mail and any attachment(s) are free 
from any virus, we advise that in keeping with good computing practice the recipient 
should ensure they are actually virus free.


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

Reply via email to