Strange behavior on 'enter'


I don't know how to put this but to classify it as a strange behavior.

I have a search page with some paramaters. A search with an input obx and three combo boxes.

If click searh with the mouse, everything is ok. But if I push the enter button when the cursor is in the input box... don´t know how to describe it... check the image attached.

Any ideas?
To solve this, go to your submit button and set the Default property as true.

Set the property defualt of your button or link that performs the search action to yes.
Probably that solves your problem.

Nelson Inácio
Makes perfect sense!

Did this solve your problem ?
Setting the search button as default didn't work out for me.

1 inputbox and a button (set as default)
Still having strange behaviour. As long as the inout box doesn't get focus: no problem.

As the input box receives focus: same strange behaviour.
Looks like a submit, but doesn't go through preparation, is not traceable where it goes....

If I check the HTML I see this  <input name="wtTxtScanVeld" type="text" maxlength="13" size="13" id="wtTxtScanVeld" class="PDA_ArtikelCode Mandatory" onkeydown="return OsEnterKey('wtZoekknop', arguments[0] || window.event)" autocomplete="off" />

Anybody knows what the OsEnterKey is behaving like ... To me it looks like it should fire the enterkey on a KeyDown.

Anybody ?

Adding a second input box on the screen removes the strange behaviour.
So for now I'll hide the second input box....

Please can you try to solve this.


I'm having this exact same problem. I only have one input (that is of type "password") and when I press the enter key, it all goes wild!
I have an anchor(<a>) set as default and this seems to be the problem since the "OsEnterKey" tries to call the "click()" method of the anchor element and it fires an javascript exception saying that the element doesn't have a click() function.

I tried to add a second input box but got no luck with this.

I found a "solution"... It isn't perfect, but it changes the behaviour to what I wanted...

So, what I did was adding an extended property to the webscreen where I set the "onsubmit" to the exact same href I had generated for my default button...

In detail:
The behaviour I wanted was the behaviour of my default anchor.
So, I checked the HTML of the page and verified that the href property of my anchor was: "javascript:__doPostBack('wt_Linkwidget290','')"
Since this was the behaviour I wanted when the user presses enter in the input field, I went to the extended properties of my web screen
In its extended properties, I added the following:
Name: "onSubmit" Value: "javascript:__doPostBack('wt_Linkwidget290','')"
Now, when I press the enter key in my input field, this javascript is executed and the behaviour I wanted happens! =)

Anyway, this solution isn't perfect since it is hardcoded and if I change the name of my anchor or such it will stop working. But, it saved my day! Hopefully, it will save yours too... =)

Best regards,
Pedro Magalhães