Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Oct : Re: Sending data to a web page

www.cryer.info
Managed Newsgroup Archive

Re: Sending data to a web page

Subject:Re: Sending data to a web page
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Fri, 19 Oct 2007 09:58:26

"aruest" <straight_018@hotmail.com> wrote in message
news:4718cba2$1@newsgroups.borland.com...

> Thank you for your response. However, I do not want
> to write a full-blown HTTP client for this.

Sorry, but you will have to.  HTTP is not trivial to implement from scratch.
There are many rules to it.  That is why you should use pre-made
libraries/APIs to reduce the amount of work you have to do in your own code.

> Now we already have this info (cust_id, transac_id, amount)
> in our Win32 delphi application.

What I described earlier for using HTTP directly will allow you to handle
that just fine without having to view the web page visually at all.

> Is there a simple way to fill the input fields on the web page running
> in IE with the information we have in our our Delphi appliaction?

Not an easy way, no.  You would have to host the IE browser directly in your
application, such as with a TWebBrowser component, and then access its DOM
interfaces to update the fields and submit the HTML form to the server.

If you cannot host the IE browser inside your app, then you will have to
write a separate BHO (browser helper object) plugin that IE loads, and then
have the BHO communicate with your app separately.  Your app can then tell
the BHO what it needs, and the BHO can then manipulate the browser.  This
approach is far more complex then simply performing the HTTP requests
directly in your app without the use of a browser at all.

> In other words, must we write all this HTTP client stuff to have
> our Win32 app automatically fill in the input fields on the web
> page running concurrently in our IE window?

If you send your own HTTP requests, then you don't need the browser at all.


Gambit

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive