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
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
http://members.home.com/hfournier/webbrowser.htm
offers a solution
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