Your link could look like this :
<a href="javascript:linkClicked()">Link Text</a>
The javascript could look like this :
linkClicked() {
document.forms[0].myHiddenField.value = 'something';
document.forms[0].action = '/differentAction.do';
document.forms[0].submit();
}
You could pass the "something" value into the function also, if needed.
Tim
|---------+---------------------------->
| | "bort" |
| | <[EMAIL PROTECTED]|
| | com> |
| | |
| | 11/03/2003 03:26 |
| | PM |
| | Please respond to|
| | "Struts Users |
| | Mailing List" |
| | |
|---------+---------------------------->
>------------------------------------------------------------------------------------------------------------------------------|
|
|
|
|
|
|
|
|
|To: [EMAIL PROTECTED]
|
|cc:
|
|
|
|
|
|
|
| Subject: Re: Submitting a form
|
>------------------------------------------------------------------------------------------------------------------------------|
Caterpillar: Confidential Green Retain Until: 12/03/2003
Retention Category: G90 -
General
Matters/Administration
Here is where I'm having a problem...
will update a hidden field in
the form, and submit the form to a different action.
If this is possible, how would I do it?
TIA
"bort" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I just realized that part of my post was cut out. Here is the post in
its
> entirety:
>
>
> Hi all
>
> I have a form that has a series of fields. When I submit the form, the
> action retrieves information from a database, based on the information in
> the form. The information retrieved is then shown the same html page
that
> the form resides on, in a table. It should be noted that the table does
NOT
> reside within the <html:form> tags. So basically, the user can make
queries
> and see the results of the queries on the same html page. Simple.
>
> Here is where I'm having a problem...
>
> <html:form> tags), I want to have a link that will update a hidden field
in
> the form, and submit the form to a different action.
>
> If this is possible, how would I do it?
>
> TIA
>
>
> "boort" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi all
> >
> > I have a form that has a series of fields. When I submit the form, the
> > action retrieves information from a database, based on the information
in
> > the form. The information retrieved is then shown the same html page
that
> > the form resides on, in a table. It should be noted that the table
does
> NOT
> > reside within the <html:form> tags. So basically, the user can make
> queries
> > and see the results of the queries on the same html page. Simple.
> >
> > Here is where I'm having a problem...
> >
> > <html:form> tags), I want to have a link that will update a hidden
field
> in
> > the form, and submit the form to a different action.
> >
> > If this is possible, how would I do it?
> >
> > TIA
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]