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]> wrote:
> 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 some of the on* attributes where not rendered in
> the page.
>
> Bruno
>
> On 25/05/07, Bjørn T Johansen <[EMAIL PROTECTED]> wrote:
> > 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:
> >
> > > 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 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
> > > > button but there is one difference
> > > > compared to clicking the button itself..
> > > >
> > > > The action method opens a popup window using the Tomahawk's
> > > > ExtestionFilter to inject the Javascript in the
> > > > rendered page and this opens as it should when clicking the button and
> > > > calling the search method. But
> > > > calling the same search method when pressing Enter does nothing... Or I
> > > > can see the page being submitted
> > > > and I see that the search method is called, but it just redraws the
> > > > page without opening the popup...
> > > >
> > > > What am I missing?
> > > >
> > > >
> > > > Regards,
> > > >
> > > > BTJ
> > > >
> > > > --
> > > > -----------------------------------------------------------------------------------------------
> > > > Bjørn T Johansen
> > > >
> > > > [EMAIL PROTECTED]
> > > > -----------------------------------------------------------------------------------------------
> > > > Someone wrote:
> > > > "I understand that if you play a Windows CD backwards you hear strange
> > > > Satanic messages"
> > > > To which someone replied:
> > > > "It's even worse than that; play it forwards and it installs Windows"
> > > > -----------------------------------------------------------------------------------------------
> > > >
> > > > --
> > > > This message has been scanned for viruses and
> > > > dangerous content by MailScanner, and is
> > > > believed to be clean.
> > > >
> > >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> >
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.