THANK you, Laurie!!
That worked!!
You have no idea how stressed I am about finishing this project so I
Really appreciate that kind of help right now!
:-)
/Ylva
I find myself with a few spare bones, so I'll throw one to Ylva ;-) Try
document.forms.NameOfForm... of
Dave Newton wrote:
x.NameOfForm.NameOfHiddenField.value = INPUTVAL
The part that I called x is the part that I don't
understand. Should it be the name of the JSP or what?
Keep searching; this is DOM/JavaScript 101. Personally I'd use a JavaScript
library, but it's not really
Ylva Degerfeldt wrote:
Hi everyone,
...
Maybe I could use the onclick attribute of s:submit but I don't know
the syntax for sending a value to the Action there. (Isn't that
javascript?)
Can somebody please help me with this?
Thanks in advance!
/Ylva
Are you asking on how to get
If each of the buttons is a Submit button, and you have each row of the
table wrapped in a separate form, you can put a s:hidden within each form,
and store/provide the ID of the row within it.
jk
On Fri, Aug 29, 2008 at 11:22 AM, Ylva Degerfeldt [EMAIL PROTECTED]
wrote:
Hi everyone,
I have
--- On Fri, 8/29/08, James Neff wrote:
s:form id=myForm name=myForm
action=OriginalAction theme=simple
input type='button' onclick=myJavaScriptMethod();
value='button label here'/
/s:form
In the head section:
function myJavaScriptMethod() {
document.myForm.action
Thanks all of you for your replies but I'm afraid they're not helping
in this case.
James, It's not about getting different buttons to do different
actions. Like I said, I'm using e.g. method = Edit or method =
Save for that.
I just need some way to return the index of the object in the list
PROTECTED]
To: user@struts.apache.org
Subject: Re: [S2] Problem with list of submit buttons
Thanks all of you for your replies but I'm afraid they're not helping
in this case.
James, It's not about getting different buttons to do different
actions. Like I said, I'm using e.g. method = Edit
--- On Fri, 8/29/08, Ylva Degerfeldt wrote:
Dave, you seem to know a whole lot about Struts 2.
Smoke and mirrors, smoke and mirrors... ask anybody.
Submit elements are often a sticky wicket.
The previous suggestion to use JavaScript might be the quickest, by using an
onclick handler to set
Dave Newton wrote:
--- On Fri, 8/29/08, James Neff wrote:
s:form id=myForm name=myForm
action=OriginalAction theme=simple
input type='button' onclick=myJavaScriptMethod();
value='button label here'/
/s:form
In the head section:
function myJavaScriptMethod() {
--- On Fri, 8/29/08, James Neff wrote:
Yesterday was about goats, and today it's about s:submit buttons.
You'd be surprised how much I know about goats.
Disturbed, but surprised.
Dave
-
To unsubscribe, e-mail: [EMAIL
Thank you Dave!
See below..
The previous suggestion to use JavaScript might be the quickest, by using an
onclick handler to set the value of a hidden form element and have the action
check that to see what element of the iterator to operate on.
As mentioned on [1] using the button type can
--- 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
Thanks again!
About the value (Question 3) I just wasn't sure I could use OGNL when
writing JavaScript but Ok. I get it.
I also found this example:
http://www.developertutorials.com/tutorials/javascript/change-form-field-values-050522/page1.html
The only thing that's left to fix now (I think)
--- On Fri, 8/29/08, Ylva Degerfeldt wrote:
About the value (Question 3) I just wasn't sure I could
use OGNL when writing JavaScript but Ok. I get it.
Just to be precise: you're not really using OGNL when writing JavaScript.
You're embedding OGNL in the onclick attribute which, when evaluated,
14 matches
Mail list logo