--- On Fri, 8/29/08, Ylva Degerfeldt wrote:
> Basically, I need to know 3 things:
> 1. Does the code have to be in a JS method or can it be
> "right under onclick"?

Doesn't matter, but since you have to both set the form field and submit the 
form it's likely to be cleaner to put it in a JavaScript method. Matter of 
preference.

> 2. How do I set the reference to the hidden field in JS?

Any JavaScript/DOM tutorial/documentation will explain that.

> 3. How do I set the value of (1) to the value of #state.index
> in JS? (Do I keep the '#', do I need %{ } or what?)

Not sure what you mean here; you'd use standard OGNL syntax:

<s:submit ... onclick="return foo(%{#state.index})" ... />

Dave

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

Reply via email to