Results 1 to 4 of 4

Thread: Posting form info to a web page

  1. #1
    Stikkboy
    Guest

    Posting form info to a web page

    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?

  2. #2
    Addicted Member csammis's Avatar
    Join Date
    Mar 2001
    Location
    /dev/null
    Posts
    226
    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
    Things I've Said:
    "Life's funny like that...elephants can wear frilly lace panties, and Dubya still looks like a monkey in a big chair"
    "Take four goats and strap one to each foot of a llama. Presto, goat-powered llama!"
    "You want to get me to work more, get me a Coke. No? Then deal with inferior garbage, I'm not coding another line and your clients can go to......thanks, I'd love a Coke right about now!"

  3. #3
    New Member
    Join Date
    Jun 2001
    Location
    Taipei
    Posts
    2
    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.

  4. #4
    Addicted Member csammis's Avatar
    Join Date
    Mar 2001
    Location
    /dev/null
    Posts
    226
    You *could* walk through every field manually, but why not use the power of Windows API calls? That's what they're there for
    Things I've Said:
    "Life's funny like that...elephants can wear frilly lace panties, and Dubya still looks like a monkey in a big chair"
    "Take four goats and strap one to each foot of a llama. Presto, goat-powered llama!"
    "You want to get me to work more, get me a Coke. No? Then deal with inferior garbage, I'm not coding another line and your clients can go to......thanks, I'd love a Coke right about now!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width