Andy,
Sorry, I haven't been following your situation closely.
Have you looked into using Javascript to have the link trigger form
submission?
An example of what I am talking about can be found here:
http://www.javascript-coder.com/javascript-form/javascript-form-submit.phtml
Robert
[EMAIL
hi Robert,
yes i've tried using javascript, but i must be doing something wrong.
i've tried two approaches. 1) i was calling a javascript function
that set the action for me and then submited the form. but the values
inside my hidden fields weren't getting picked up. 2) Wendy gave me a
Andy,
I don't have an answer but what I would try first is examining those
values on the client.
First do a view source on your generated HTML and make sure your values
are there.
Next in your Javascript after you've set any values but before you
submit your form (which should be last anyway) use
From: Andrew Close [EMAIL PROTECTED]
2) Wendy gave me a
slightly different approach to try by calling the function and setting
the values of the hidden fields and then submitting. however, two of
the hidden fields are set upon arrival to the page by my action form.
but they are not being
-Original Message-
From: Andrew Close [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 9:10 AM
To: Struts Users Mailing List
Subject: Re: Re: Why does html:submit work differently than
html:link
action=?
hi Robert,
yes i've tried using javascript, but i must
Hi, Andrew:
If you are going to show HTML try the pre tag and change the HTML tags
with lt; and gt; instead of and .
What you are doing, Andrew, is not clear to me. You have talked about
using html:link instead of html:submit to submit a form. I have no
idea why you would ever think these
Subject: RE: Re: Why does html:submit work differently than html:link
action=?
-Original Message-
From: Andrew Close [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 9:10 AM
To: Struts Users Mailing List
Subject: Re: Re: Why does html:submit work differently than
Andrew, could you restate what you are trying to do? Why are you using
JavaScript? My guess is there is a safer and sounder way to solve whatever
your problem is, if you merely are trying to submit a form with some issues
which are unknown to me around that.
Michael
Robert,
:) i'm a step ahead of you. my values do show up in the client side
html before submitting the form. and they show up in alert statements
upon submission. that is what is so puzzling. i'm seeing the data,
but when i set breakpoints in my actionform set methods, two of them
aren't
Hi Wendy,
yes my submit button is named submit. but when i tested using it i
wasn't using javascript. ;)
only the links are using javascript to set one hidden field on the
form. i hard coded that value with the submit button. in all cases
the hardcoded value or the value set via javascript is
At 09:41 AM 7/28/2004, you wrote:
Robert,
:i'm seeing the data,
but when i set breakpoints in my actionform set methods, two of them
aren't being called...
andy
The question, Andy, whatever your problem is, that Robert is posing is
whether form.field.value shows the data. Whether you are just
+1 on this.. Actually make that a +100..:)
-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 12:44 PM
To: Struts Users Mailing List
Subject: Re: Re: Why does html:submit work differently than
html:link
action=?
At 09:39 AM 7
Jim,
heh, i would prefer not to use javascript, but i couldn't think of
another way to submit the form with links. the form is a html:form
and all of the html components inside the form are Struts html
components. the link just has an onclick parameter in it that calls
the javascript. the
At 09:52 AM 7/28/2004, you wrote:
heh, i would prefer not to use javascript, but i couldn't think of
another way to submit the form with links.
Why in Heaven's name would you want to submit a form with a link? Please
step back one step further and tell us why you want to use a link to do
what
Hi Michael,
i agree, what i'm attempting is kindof goofy.
i'm trying to submit a form using a hyper-link instead of a submit
button. i have three links on the page that perform similar but
different actions. each link sets a value in a hidden field that
should be picked up by the actionform
-Original Message-
From: Andrew Close [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 9:52 AM
To: Struts Users Mailing List
Subject: Re: Re: Why does html:submit work differently than
html:link
action=?
Jim,
heh, i would prefer not to use javascript, but i
At 09:58 AM 7/28/2004, you wrote:
i agree, what i'm attempting is kindof goofy.
Hi, Andy,
You are stuck in a bad solution and all the discussion is about the goofy
solution. However, if you would, once again, just tell us what the problem
is, we can give you solutions, I would bet, that are not
At 10:16 AM 7/28/2004, you wrote:
Sorry Michael, i wasn't ignoring you. you must've responded to each
of my responses to the others. :)
the original problem was that i have to add a product to the database.
when the user clicks the initial add button they are taken to a page
that has three links
At 10:25 AM 7/28/2004, you wrote:
Nope. It's not a struts issue at all... it's an HTML issue.
My response was not really too tactful, Jim. Sorry! I am not a very
tactful person.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
At 10:12 AM 7/28/2004, you wrote:
The text on each tab is a
hyperlink, and I *have* to make the form submit when the user clicks to
switch to another tab, or I lose whatever they've typed on the form. I do
it with JavaScript:
This is the problem, Wendy. Don't make the text on the tag a
-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 10:31 AM
To: Struts Users Mailing List
Subject: RE: Re: Re: Re: Why does html:submit work differently than
html:link action=?
At 10:25 AM 7/28/2004, you wrote:
Nope. It's
From: Andrew Close [EMAIL PROTECTED]
so in the Struts world, is there a way to submit a form using a
hyperlink without using javascript?
In your case, YES, I think this can be done without JavaScript (although
that's still my preferred solution).
The reason is that it does not sound like the
At 10:37 AM 7/28/2004, you wrote:
In your case, YES, I think this can be done without JavaScript (although
that's still my preferred solution).
The reason is that it does not sound like the user gets to make any changes
to the data on this page with the three links. In this case, you already
know
At 10:42 AM 7/28/2004, you wrote:
if([ActionForm].getButton().getFirstChoice().pressed()) {
// do whatever
} else if ([ActionForm].getButton().getSecondChoice().pressed()) {
// do whatever
} else if([ActionForm].getButton().getSecondChoice().pressed()) {
// do whatever
} else {
// throw
Wendy wrote:
The text on each tab is a
hyperlink, and I *have* to make the form submit when the user clicks to
switch to another tab, or I lose whatever they've typed on the form. I
do
it with JavaScript:
Michael wrote:
This is the problem, Wendy. Don't make the text on the tag a
At 10:55 AM 7/28/2004, you wrote:
I'm going to bow out of this now-- you have your solution, I have mine, both
of them work, and the OP can choose one of the many ideas that have been
thrown out there and be on his way.
Okay dokay, and agreed. I always like discussing these things with you
wow, i didn't mean to start such a heated debate. :)
but thanks to everyone for their suggestions.
Wendy, i was actually doing something similar to your suggestion but i
was appending the parameters to the action using javascript. i don't
know why i didn't think of just putting them in the
At 11:40 AM 7/28/2004, you wrote:
wow, i didn't mean to start such a heated debate. :)
but thanks to everyone for their suggestions.
Hopefully more light than heat, Andy. I know I learned a lot. Michael
-
To unsubscribe,
At 11:40 AM 7/28/2004, you wrote:
(i may email you off list with
questions if you don't mind).
That's fine.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
At 02:36 PM 7/28/2004, you wrote:
not to fuel the fire from the previous discussion, but this situation
works fine if a href is used instead of html:link
example:
pre
now use an anchor tag instead of the Struts anchor tag: Submit the form
with a link Submit with a different value . . .
hopefully
At 02:44 PM 7/28/2004, you wrote:
At 02:36 PM 7/28/2004, you wrote:
not to fuel the fire from the previous discussion, but this situation
works fine if a href is used instead of html:link
example:
pre
now use an anchor tag instead of the Struts anchor tag: Submit the form
with a link Submit with
Close [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 2:37 PM
To: Struts Users Mailing List
Subject: Re: Why does html:submit work differently than html:link
action=?
a href=# onclick=submitOne(); Submit the form with a link/a
html:link href=# onclick=submitOne();Submit
-Original Message-
From: Andrew Close [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 2:58 PM
To: Struts Users Mailing List
Subject: Re: Why does html:submit work differently than html:link
action=?
ok, my bad. :)
i tried html:link forward= / and html:link action
The form is being submitted to wherever the form says, regardless of method used to
submit. So, action and forward are entirely inappropriate to use for the link in
this case. They have nothing to do with the what you want to do, which is submit
the form using javascript. What was
-Original Message-
From: Andrew Close [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 3:14 PM
To: Struts Users Mailing List
Subject: Re: Why does html:submit work differently than html:link
action=?
The form is being submitted to wherever the form says,
regardless
From: Andrew Close [EMAIL PROTECTED]
the one thing i'm still fuzzy with is why would the actionform only
populate with one of the three hidden field values?
That whole thing where you were adding parameters to the action attribute of
the form, then submitting it with JavaScript called from an
-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 3:24 PM
To: Struts Users Mailing List
Subject: Re: Why does html:submit work differently than html:link
action=?
From: Andrew Close [EMAIL PROTECTED]
the one thing i'm still fuzzy
yeah, i was attempting to use a DispatchAction class instead of just
single action classes for each event. so that parameter was the
appropriate method in the DispatchAction class.
i'm refactoring all that right now. using separate actions is easier
for a noob to keep track of. ;) and simpler
38 matches
Mail list logo