Submit using the enter key?

2007-05-25 Thread Bjørn T Johansen
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

Re: Submit using the enter key?

2007-05-25 Thread Bruno Aranda
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

Re: Submit using the enter key?

2007-05-25 Thread Bruno Aranda
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

RE: Submit using the enter key?

2007-05-25 Thread William Hoover
- 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

Re: Submit using the enter key?

2007-05-25 Thread Bjørn T Johansen
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

RE: Submit using the enter key?

2007-05-25 Thread William Hoover
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

Re: Submit using the enter key?

2007-05-25 Thread Bjørn T Johansen
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:

Re: Submit using the enter key?

2007-05-25 Thread Bjørn T Johansen
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]

Re: Submit using the enter key?

2007-05-25 Thread Mario Ivankovits
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

Re: Submit using the enter key?

2007-05-25 Thread Bjørn T Johansen
) || (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

Re: Submit using the enter key?

2007-05-25 Thread Bruno Aranda
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

Re: Submit using the enter key?

2007-05-25 Thread Bruno Aranda
? -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

RE: Submit using the enter key?

2007-05-25 Thread William Hoover
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

Re: Submit using the enter key?

2007-05-25 Thread 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

Re: Submit using the enter key?

2007-05-25 Thread Ayhan Güngör
@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

Re: Submit using the enter key?

2007-05-25 Thread Bruno Aranda
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

Re: Submit using the enter key?

2007-05-25 Thread Bjørn T Johansen
] 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

Re: Submit using the enter key?

2007-05-25 Thread Bjørn T Johansen
- 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

Re: Submit using the enter key?

2007-05-25 Thread Bjørn T Johansen
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