PDA

Click to See Complete Forum and Search --> : Posting form info to a web page


Stikkboy
Jun 15th, 2001, 04:56 PM
Hi!

I'm trying to write a stand alone app that uses the web browser component as a built in browser. I want to be able to load up a page and determine if a form is present. If it's there, I'd like to be able to automatically input pre-set data that corresponds to the correct form fields. I don't want to pull anything from a database. I'd like to have the pre-set data readily accesible in the app. Has anybody had any experience doing anything like this?

csammis
Jun 16th, 2001, 12:26 AM
Actually, I think there's a demo of just that using the API on www.vb-world.net I'd search for it, but that's generating an 500 Internal Server error :(

Jaishin
Jun 16th, 2001, 05:00 AM
You can use DOM to solve your problem easily.

1. Referencing MSHTML into your app.
2. set you WebBrowser's document property to HTMLDocument.

Then you can walk throuth DOM of the page, post form data, press a button, click a hyperlink..., do anything you want.

Infact, if you know DOM, it's not necessary to reference MSHTML, just use WebBrowser's document property, it's the same.

csammis
Jun 16th, 2001, 12:06 PM
You *could* walk through every field manually, but why not use the power of Windows API calls? That's what they're there for :D