The IE DOM sounds like the way to go.
↧
From: | Brian Abbott |
To: | Rick Strahl |
The IE DOM sounds like the way to go.
You can control the page via the DOM and fill the fields from FoxPro code directly. You basically get a reference to the document then do document.getElementById() to get each field on the form and set its value property.
Pretty easy to do actually...
Here's an article that describes some of this:
http://www.west-wind.com/presentations/shellapi/shellapi.asp#_The_HTML_Object_Model
Note this will only work with IE. If you have to use another browser then you have to automate via keyboard events (which doesn't work very well with browsers - not recommended especially since the HTML layout can easily change).
+++ Rick ---
I have a requirement to autofill an external web page (that I have no control over) from VFP9.
Does anyone have any example code I could learn from, or info on how best to do this?
I'm presuming that:
launch the web page in the browser
wait for the web page to load
set the focus to the browser
then use KEYBOARD
... could be made to work, but it feels a bit hacky. Any other options?
Thanks in advance
Brian