Solved

DELPHI: how to insert string data to input text box (web browser ) ?

Posted on 2014-10-03
3
667 Views
Last Modified: 2014-10-15
DELPHI: how to insert string data to input text box (web browser ) ?
i trying to use
 wb1.OleObject.Document.getElementById('zip_code').setAttribute('value', '90001');

Open in new window

but i got error , because the page that i want to add for it value available in iframe
Kind Regards.
0
Comment
Question by:napster matheo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 27

Accepted Solution

by:
Sinisa Vuk earned 500 total points
ID: 40362524
try to iterate through iframes:
....
  frameDispatch: IDispatch;
  frame_win: IHTMLWindow2;
  frame_doc: IHTMLDocument2;
  j: OleVariant;
  Tag: IHTMLElement;
...
    for i := 0 to Doc.frames.Length - 1 do
    begin
      j := i;
      frameDispatch := Doc.frames.Item(j);
      if Assigned(frameDispatch) then
      begin
        frame_win := frameDispatch as IHTMLWindow2;
        frame_doc := frame_win.document;
        Tag := frame_doc.getElementById('zip_code');
        if VarIsNull(Tag) then
        begin
           Tag.setAttribute('value', '90001');
           Break; 
         end;
      end;

Open in new window

0
 

Author Closing Comment

by:napster matheo
ID: 40381546
Thank You , I Think it's gonna be working , Once Again Thank you
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question