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
Solved

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

Posted on 2014-10-03
3
598 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
3 Comments
 
LVL 26

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

837 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