Wendy, I have three visible buttons, a cancel, then a reset and a
submit. So I added the hidden submit as the first button, moving the
visible buttons to the right. The HTML rendered for all four buttons by
the Struts tags is (I added the line breaks):
But for some reason, the "E
Michael, this is the original question I posted (yesterday morning):
I found this JavaScript, which is supposed to listen for the "Enter" key
on any browser (and submit the form on keypress). However, it doesn't
seem to be working in IE:
if (document.layers) document.captureEvents(Event.KE
From: "Erik Weber" <[EMAIL PROTECTED]>
> Rick, I tried putting a hidden submit button ( style="display:none"/>) in front of my cancel button to intercept the
> "Enter" key, but again, this worked in Mozilla but not IE (just like my
> key listener JavaScript).
> So I'm still looking for an Enter key
Erik Weber wrote:
Rick, I tried putting a hidden submit button () in front of my cancel button to intercept the
"Enter" key, but again, this worked in Mozilla but not IE (just like
my key listener JavaScript).
So I'm still looking for an Enter key listener that is portable. I
haven't tried ever
Rick, I tried putting a hidden submit button () in front of my cancel button to intercept the
"Enter" key, but again, this worked in Mozilla but not IE (just like my
key listener JavaScript).
So I'm still looking for an Enter key listener that is portable. I
haven't tried every suggestion I got
ruts Users Mailing List
Subject: Re: [OT] "Enter" key listener for form submittal
It is necessary in my case because it is a requirement specified by the
client. On very simple forms, it often won't require any programming.
But if you have multiple submit buttons, it becomes a
't know if something like this would work in your situation though. It
works in IE and Netscape.
-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 9:34 AM
To: Struts Users Mailing List
Subject: Re: [OT] "Enter" key listener f
ry in order to submit
a form?
-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 9:18 AM
To: Struts Users Mailing List
Subject: Re: [OT] "Enter" key listener for form submittal
David Durham wrote:
Erik Weber wrote:
I found
Out of curiosity, why is an enter key listener necessary in order to submit
a form?
-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 01, 2004 9:18 AM
To: Struts Users Mailing List
Subject: Re: [OT] "Enter" key listener for form submitta
Erik Weber wrote:
Also, does document.forms[0].submit() trigger the submit with a submit
value of cancel? Does that make since?
Hmm, would it not fail also on Mozilla if that were true?
Perhaps. I just glanced at the thread, so I have a cursory
understanding of the problem.
- Dave
-
David Durham wrote:
Erik Weber wrote:
I found this JavaScript, which is supposed to listen for the "Enter" key
on any browser (and submit the form on keypress). However, it doesn't
seem to be working in IE:
if (document.layers) document.captureEvents(Event.KEYDOWN);
document.onkeydown =
function
Erik Weber wrote:
I found this JavaScript, which is supposed to listen for the "Enter" key
on any browser (and submit the form on keypress). However, it doesn't
seem to be working in IE:
if (document.layers) document.captureEvents(Event.KEYDOWN);
document.onkeydown =
function (evt) {
var keyCode =
Erik Weber wrote:
Would this button then need an onclick to
submit the form, or is that not necessary?
I haven't had to use the approach but I don't think it would be
necessary to add an onclick. Just make it's a regular submit button and
make sure it's hidden after the tag
--
Rick
--
Rick, this is a new concept to me. Is the strategy to make this button
the first one in line on each screen, and therefore it will be the
target of the "Enter" key? Would this button then need an onclick to
submit the form, or is that not necessary?
Thanks,
Erik
Rick Reumann wrote:
Erik Weber w
Slattery, Tim - BLS wrote:
I found this JavaScript, which is supposed to listen for the
"Enter" key on any browser (and submit the form on keypress).
However, it doesn't seem to be working in IE:
I don't think you need this. By default, pushing the "Enter" key is
equivalent to clicking the "Submi
Erik Weber wrote:
I need it because I have multiple buttons. On some screens, the Enter
key triggers the "Cancel" button, which is not desirable. The "Cancel"
button appears before the "Submit" button.
I would think making an extra submit button that was hidden (using css)
would be easier.
--
R
And, now I will repost the code which was omitted in a reply:
Erik Weber wrote:
I found this JavaScript, which is supposed to listen for the "Enter"
key on any browser (and submit the form on keypress). However, it
doesn't seem to be working in IE:
if (document.layers) document.captureEvents(E
I need it because I have multiple buttons. On some screens, the Enter
key triggers the "Cancel" button, which is not desirable. The "Cancel"
button appears before the "Submit" button.
Erik
Slattery, Tim - BLS wrote:
I found this JavaScript, which is supposed to listen for the
"Enter" key on any
> I found this JavaScript, which is supposed to listen for the
> "Enter" key on any browser (and submit the form on keypress).
> However, it doesn't seem to be working in IE:
I don't think you need this. By default, pushing the "Enter" key is
equivalent to clicking the "Submit" button.
--
Tim S
I found this JavaScript, which is supposed to listen for the "Enter" key
on any browser (and submit the form on keypress). However, it doesn't
seem to be working in IE:
if (document.layers) document.captureEvents(Event.KEYDOWN);
document.onkeydown =
function (evt) {
var k
20 matches
Mail list logo