Re: S2: concat doesn't work.

2007-11-27 Thread panpan
Thanks, Dave. That explains the problem I had for this example. newton.dave wrote: > > --- panpan <[EMAIL PROTECTED]> wrote: >> But the below is not working if replace 1 with a >> variable >> >> >> var number = 1; >> var name = '> > value="additionalInterests['+number.t

RE: S2: concat doesn't work.

2007-11-27 Thread panpan
Hi David, Thank you for your explaination. I just started to work on Javascript recently and have lots of things to learn. Why is the first example working? It's a Struts2 tag insice the Javascript. There are not much differences between the first example and the second example except the second

Re: S2: concat doesn't work.

2007-11-27 Thread Dave Newton
--- panpan <[EMAIL PROTECTED]> wrote: > But the below is not working if replace 1 with a > variable > > > var number = 1; > var name = ' value="additionalInterests['+number.toString()+'].bankName"/>'; > alert("Name: " + name); > JavaScript is executed *AFTER* your J

RE: S2: concat doesn't work.

2007-11-27 Thread Hernandez, David
You're getting confused about the role of Javascript in your application, panpan. Javascript does not execute at the same time as Java. Java can generate dynamic javascript on the server and send it to a client. The javascript then executes on the client (web browser). You cannot have javascript c