I am trying to submit a form using the enter key, but it doesn't work...
I have the following code in mye jsp:
h:inputText . onkeypress=if (event.keyCode == 13)
document.getElementById('formFindArticle:search').click();
and it does call the search method that is specified in th search
Can you verify if the onkeypress attribute is rendered on the input by
looking at the generated source code?
Firebug works great to check these things,
Cheers,
Bruno
On 25/05/07, Bjørn T Johansen [EMAIL PROTECTED] wrote:
I am trying to submit a form using the enter key, but it doesn't
Because I guess that the default behaviour of the browser is to click
the submit button when pressing enter. This is why you get the same
behaviour. Maybe the javascript of your onkeypress is not rendered on
the page. I seem to recall a similar but, but I don't remember if it
is this one, where
-
From: Bruno Aranda [mailto:[EMAIL PROTECTED]
Sent: Friday, May 25, 2007 6:50 AM
To: MyFaces Discussion
Subject: Re: Submit using the enter key?
Because I guess that the default behaviour of the browser is to click
the submit button when pressing enter. This is why you get the same
behaviour
Yes, I tried just to see if it acted differently but it was the same result...
BTJ
On Fri, 25 May 2007 13:13:07 +0200
Mario Ivankovits [EMAIL PROTECTED] wrote:
Hi !
I am trying to submit a form using the enter key, but it doesn't work...
Ever tried to use our SubmitOnEvent [1] sandbox
Could you show a snippet of the browser output with the input, button and form?
-Original Message-
From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
Sent: Friday, May 25, 2007 7:19 AM
To: users@myfaces.apache.org
Subject: Re: Submit using the enter key?
Tried this but with the same
Well, if I debug my app and put a breakpoint in my search method, I do get
inside my search method and the exact
same thing happends in that method no matter it I press the Enter key og click
the submit button...
BTJ
On Fri, 25 May 2007 11:22:20 +0100
Bruno Aranda [EMAIL PROTECTED] wrote:
It is another button that is the default button, so if I remove my onkeypress
event, that button it pressed...
Also if I just show an alert inside my onkeypress script, the alert is shown
when pressing the Enter key
BTJ
On Fri, 25 May 2007 11:50:19 +0100
Bruno Aranda [EMAIL PROTECTED]
Hi !
I am trying to submit a form using the enter key, but it doesn't work...
Ever tried to use our SubmitOnEvent [1] sandbox component?
Ciao,
Mario
[1] http://wiki.apache.org/myfaces/SubmitOnEvent
) || (event.keyCode
event.keyCode == 13))
document.getElementById('formFindArticle:search').onclick();
-Original Message-
From: Bruno Aranda [mailto:[EMAIL PROTECTED]
Sent: Friday, May 25, 2007 6:50 AM
To: MyFaces Discussion
Subject: Re: Submit using the enter key?
Because I guess
of the browser output with the input, button and
form?
-Original Message-
From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
Sent: Friday, May 25, 2007 7:19 AM
To: users@myfaces.apache.org
Subject: Re: Submit using the enter key?
Tried this but with the same result...
BTJ
On Fri, 25
?
-Original Message-
From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
Sent: Friday, May 25, 2007 7:19 AM
To: users@myfaces.apache.org
Subject: Re: Submit using the enter key?
Tried this but with the same result...
BTJ
On Fri, 25 May 2007 07:10:05 -0400
William Hoover [EMAIL
Subject: Re: Submit using the enter key?
I think I see a myfaces bug in the onkeypress. It seems that the
have been encoded. As a workaround use a external javascript file with
a function for the onkeypress and call it.
Could you fill a JIRA also?
Thanks!
Bruno
On 25/05/07, Bjørn T Johansen
you show a snippet of the browser output with the input, button and
form?
-Original Message-
From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
Sent: Friday, May 25, 2007 7:19 AM
To: users@myfaces.apache.org
Subject: Re: Submit using the enter key?
Tried this but with the same
@myfaces.apache.org
Subject: Re: Submit using the enter key?
Tried this but with the same result...
BTJ
On Fri, 25 May 2007 07:10:05 -0400
William Hoover [EMAIL PROTECTED] wrote:
Just an FYI... You may need to add code for browser compatibility
(Notice that the click() has been changed
Message-
From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
Sent: Friday, May 25, 2007 7:19 AM
To: users@myfaces.apache.org
Subject: Re: Submit using the enter key?
Tried this but with the same result...
BTJ
On Fri, 25 May 2007 07:10:05 -0400
William
]
Sent: Friday, May 25, 2007 7:19 AM
To: users@myfaces.apache.org
Subject: Re: Submit using the enter key?
Tried this but with the same result...
BTJ
On Fri, 25 May 2007 07:10:05 -0400
William Hoover [EMAIL PROTECTED] wrote
-
From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
Sent: Friday, May 25, 2007 7:19 AM
To: users@myfaces.apache.org
Subject: Re: Submit using the enter key?
Tried this but with the same result...
BTJ
On Fri, 25 May 2007 07:10:05 -0400
William Hoover
Subject: Re: Submit using the enter key?
Tried this but with the same result...
BTJ
On Fri, 25 May 2007 07:10:05 -0400
William Hoover [EMAIL PROTECTED] wrote:
Just an FYI... You may need to add code for browser
19 matches
Mail list logo