Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ENTER Key in Delphi Web Browser object

321 views
Skip to first unread message

Dean G>

unread,
Aug 30, 2001, 7:08:53 PM8/30/01
to
Any Help would be appreciated...

We have created an ASP page app that will allow anonymous users to get
info from a public workstation. To lock this web page up within the
browser, we created a Delphi web browser, with no page controls, like
back and forward, address bars etc. The users can only access this
page,wonderful. We have even added a keypad only input, so they can't
even attempt to use windows function keys (only numeric input is
required in web form)... Here's the problem,

The html code calls for a set focus (using javascript) on a submit
button, at which time it is waiting for the user to hit the ENTER key to
return to the main form entry. The Delphi web browser object will not
accept any ENTER key strokes to invoke this submit button. The button
does assume focus when the page is loaded, just the ENTER key won't
work. The ENTER key does work with IE and NS, with this same html
form/code. Another note, the space bar WILL invoke the submit button in
the delphi browser, however since we are using a 9-key pad, there is no
space bar available. Any ideas why the ENTER key will not work on a
submit button in HTML code using the delphi web browser?

Thanks,
Dean Gobrecht

Martin Kammann

unread,
Aug 30, 2001, 8:06:53 PM8/30/01
to
> return to the main form entry. The Delphi web browser object will not
> accept any ENTER key strokes to invoke this submit button. The button
> does assume focus when the page is loaded, just the ENTER key won't
> work. The ENTER key does work with IE and NS, with this same html
> form/code. Another note, the space bar WILL invoke the submit button in
> the delphi browser, however since we are using a 9-key pad, there is no
> space bar available. Any ideas why the ENTER key will not work on a
> submit button in HTML code using the delphi web browser?


try this:
- Set the form's KeyPreview property to true
- create a KeyPress event and check for the enter key (#13).
- Grab the form element (an IHTMLFormElement) within the
HTML DOM (shouldn't be a problem in your case, you
obviously have control over the page you're working with).
- Call the submit method of the form element.

--
Martin


NmLism

unread,
Aug 31, 2001, 6:31:31 AM8/31/01
to
> The html code calls for a set focus (using javascript) on a submit
> button, at which time it is waiting for the user to hit the ENTER key to
> return to the main form entry. The Delphi web browser object will not
> accept any ENTER key strokes to invoke this submit button. The button
> does assume focus when the page is loaded, just the ENTER key won't
> work. The ENTER key does work with IE and NS, with this same html
> form/code. Another note, the space bar WILL invoke the submit button in
> the delphi browser, however since we are using a 9-key pad, there is no
> space bar available. Any ideas why the ENTER key will not work on a
> submit button in HTML code using the delphi web browser?

http://members.home.com/hfournier/webbrowser.htm
offers a solution


Dean G>

unread,
Aug 31, 2001, 8:49:51 AM8/31/01
to
That link isn't working?

Dean G>

unread,
Aug 31, 2001, 1:31:18 PM8/31/01
to
Oopps, site won't work with netscape, only IE.

Andrew McCready (Browsure Support)

unread,
Aug 31, 2001, 5:48:13 PM8/31/01
to
Dean,
it is an annoying problem i know, however we found the solution while trying
to solve abother problem(hiding the IE menu when you right click)

Go to http://www.euromind.com/iedelphi/EmbeddedWb.htm

this has an improved version of the webbrowser component with added features
and the enter key works in forms!!

The documentation for the extra features is on thw website.

Andrew McCready
Browsure Software
www.browsure.co.uk


0 new messages