Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Webbrowser and formfields....help!

petefpetef Member Posts: 2
Hallo,
a guy showed me how I could interact with a inputfield on a webpage using a button and a webbrowser. The button command is WebBrowser1.OleObject.document.formname.inputboxname.value := 'Hallo';
This all works nicely but what do I do if the form hasn't got a name?
I can't leave the formfield out......it courses and error :(. Someone please help!

Rgs Pete

Comments

  • zibadianzibadian Member Posts: 6,349
    : Hallo,
    : a guy showed me how I could interact with a inputfield on a webpage using a button and a webbrowser. The button command is WebBrowser1.OleObject.document.formname.inputboxname.value := 'Hallo';
    : This all works nicely but what do I do if the form hasn't got a name?
    : I can't leave the formfield out......it courses and error :(. Someone please help!
    :
    : Rgs Pete
    :
    You could check if the formfield exists on the page using an if-then statement. I think something like this will do the trick:
    [code]
    if WebBrowser1.OleObject.document.formname<>nil then
    WebBrowser1.OleObject.document.formname.inputboxname.value := 'Hallo';
    [/code]
  • petefpetef Member Posts: 2
    Thank you but that doesn't solve my problem. Im looking for a way to add information in inputfields without using the "form".

    Rgs Pete
  • Shawn CarterShawn Carter Member Posts: 0

    ____ [ http://forcoder.org ] free video tutorials and ebooks about \ C, Assembly, JavaScript, Delphi, Visual Basic, Java, Objective-C, Go, Python, C#, Scratch, Visual Basic .NET, R, MATLAB, Ruby, C++, Swift, Perl, PHP, PL/SQL COBOL, SAS, Logo, Lisp, Kotlin, LabVIEW, Bash, Fortran, Dart, ABAP, Scheme, Scala, Transact-SQL, Apex, VBScript, ML, Erlang, Alice, Lua, Ada, D, Prolog, F#, Julia, Rust, Clojure, Crystal, FoxPro, Awk, Hack \ ______________

Sign In or Register to comment.