I.T. Discussion Community!
-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
-Collapse +Expand Delphi To/From
To/FromCODEGuides
-Collapse +Expand Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

July Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyPascal and Delphi Coding BoardDelphi VCL Topic   Print This     

Using TWebbrowser to enter text and click button

Using TWebbrowser to enter text and click button in Delphi VCL topic (part of our Pascal and Delphi Coding group).

Quick Search: TWebbrowser   Using TWebbrowser   Using TWebbrowser enter   text click  
riotboy
Melbourne, -- AU

Using TWebbrowser to access a web form with a few fields on it, and a couple of buttons.

I want to enter some text into one of these form Fields, then click one of the buttons ('Search'), with delphi code accessing the page via TWebbrowser.

I can access the complete HTML page source (is in a frame but i do a fool workaround to trick it into discarding the outer frame anyway).  I know what the button and the field names are.

Having Zero luck with this so far, need a direction to be pointed in if nothing more.  Any Ideas?

 Posted 12 years ago (Thread Starter)
Comment Quote
About riotboy -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #12534, 1 replies
Thread Started 3/12/2008 11:01:44 PM
View Counter=4129
Last Reply Posted 3/13/2008 12:07:40 PM)
Location=Melbourne, -- AU 
Joined=12 years ago   MB Posts=1  
Most Recent Post
Wes Peterson
Prestwood IT
Prestwood IT office in Citrus Heights, CA

Matt:

You're entering interesting territory!

Delphi, itself, doesn't know much about the HTML that happens to be loaded in a TWebBrowser.

The good news is that TWebBrowser has a property, "Document,"  that you may find helpful.

The Document property gets you an IDispatch interface to the document.  From that point on, you are in Microsoft land.  Here's a link that'll describe the Document in plenty detail:

http://msdn2.microsoft.com/en-us/library/ms535862(VS.85).aspx

You'll want to explore the collections, particularly the "forms" collection.

Events, like onfucusout, may be helpful, too.

Good luck! 

Wes Peterson
Senior Software Engineer
Prestwood IT Solutions
http://www.prestwood.com

 Posted 12 years ago
Comment Quote
About Wes Peterson -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Wes Peterson

Wes Peterson is a Senior Programmer Analyst with Prestwood IT Solutions where he develops custom Windows software and custom websites using .Net and Delphi. When Wes is not coding for clients, he participates in this online community. Prior to his 10-year love-affair with Delphi, he worked with several other tools and databases. Currently he specializes in VS.Net using C# and VB.Net. To Wes, the .NET revolution is as exciting as the birth of Delphi.


Post ID #12535 (Level 1.1)  Reply to 12534
Thread Started 3/13/2008 12:07:40 PM
Location=Prestwood IT office in Citrus Heights, CA 
Joined=16 years ago   MB Posts=158   KB Posts=163   KB Comments=34   BLOG, Topics=20  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1121A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #12534 Counter
4129
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech