of
the formbean property 'btnpressed' value and do processing accordingly.
Vijaya
-Original Message-
From: Thomas Sundberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 26, 2005 8:23 PM
To: 'Struts Users Mailing List'
Subject: Which button was pressed?
Hi!
I have a form where a user should
Hi!
I have a form where a user should be able to request a report. The user
enters two dates and then presses either a button labeled pdf, html och csv.
How can I read in my action which button was pressed?
My form looks something like this:
The button part of my form looks something like
labeled pdf, html och csv.
How can I read in my action which button was
pressed?
My form looks something like this:
The button part of my form looks something like
this:
html:submit value=pdf
alt=Create a pdf file/
html:submit value=html
alt=View report
html:submit value=replace property=submit
bean:message key=app.replace/
/html:submit
-Original Message-
From: Thomas Sundberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 26, 2005 10:53 AM
To: 'Struts Users Mailing List'
Subject: Which button was pressed?
Hi!
I
From: Braun, James F [EMAIL PROTECTED]
The value of the button pressed
will be stored in the bean's submit variable (which you must create).
The bean:message tag is there so that the button's title will be set
according to the locale setting. app.submit, app.renew, and app.replace
refer to
) to determine
which button was pressed. The value is not important in this case.
HTH,
- Scott
-Original Message-
From: Braun, James F [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 26, 2005 11:18 AM
To: Struts Users Mailing List
Subject: RE: Which button was pressed?
Finally
property is set ...
Tamas
Paul Moody
--- Thomas Sundberg
[EMAIL PROTECTED] wrote:
Hi!
I have a form where a user should be able to request
a report. The user
enters two dates and then presses either a button
labeled pdf, html och csv.
How can I read in my action which button was
pressed?
My
;
document.formName.submit();
Just a thought..
Martin-
- Original Message -
From: Wendy Smoak [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, July 26, 2005 11:27 AM
Subject: Re: Which button was pressed?
From: Braun, James F [EMAIL PROTECTED]
The value
On 7/26/05, Thomas Sundberg [EMAIL PROTECTED] wrote:
Hi!
I have a form where a user should be able to request a report. The user
enters two dates and then presses either a button labeled pdf, html och csv.
How can I read in my action which button was pressed?
DispatchAction and all its
Wendy Smoak wrote:
You may also want to add a hidden button at the very top of the form, with
a value that causes your app to simply redisplay the form.
At least on IE, pressing enter in a text field will submit the form without
the user pressing _any_ of the buttons. But IE will send the
From: Laurie Harper [EMAIL PROTECTED]
By 'hidden button' do you mean a regular input w/ type=submit and CSS to
hide it?
Yes. :) In my case, defaulting to the first button on the form didn't make
sense, so that invisible button does nothing. The form is submitted and
re-displayed as-is. The
Is that a type=button or type=submit? Just to clarify, because return
only affects submits I believe.
Also, I'm pretty sure if you do:
onClick=return false;
...attached to that invisible button, you wouldn't even get the redisplay
submission.
--
Frank W. Zammetti
Founder and Chief Software
12 matches
Mail list logo