Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Autofill a web page

$
0
0
Re: Autofill a web page
FoxPro Programming
Re: Autofill a web page
Apr. 3, 2013
03:34 pm
3R40XE5MPShow this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:Brian Abbott

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 ---



Hi

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



Rick Strahl
West Wind Technologies


from Maui, Hawaii

Making waves on the Web


Viewing all articles
Browse latest Browse all 10393

Trending Articles