Webbrowser and formfields....help!

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

  • : 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]
  • 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
Sign In or Register to comment.

Howdy, Stranger!

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

Categories

In this Discussion