WebBrowser Control Problem , simulating submit button 
Author Message
 WebBrowser Control Problem , simulating submit button

Hi All,

Hopefully someone may have come across this problem, I have a vb 6 form with
webbrowser control (wb)
at form load, wb navigates to a particular page and then should
automatically fill in a form and simulate clicking of the submit button.
I've used this technique before with no problem but for some reason today i
can make it work, it keeps coming back with error 438 : object doesnt
support this property or method and the line it falls over on is the submit
line.  here is a snippet of code.

      wb.Document.Forms("form1").elements("emailaddress").Value = email.Text
      wb.Document.Forms("form1").submit

the form is there, but it just cant see the submit method ? Any Ideas ?

Any advice / words of wisdom appreciated...

Dave Brown



Fri, 31 Dec 2004 18:34:04 GMT  
 WebBrowser Control Problem , simulating submit button
I tried your code on my side (VB6+SP4) and it worked fine.

Please try to use the folowing code instead on your side and see if it
works:

With WebBrowser1
        .Document.Forms("form1").elements("text1").Value = email.Text
        .Document.All("form1").submit
End With

Gary

This posting is provided "AS IS", with no warranties, and confers no
rights. Enjoyed ASP.NET? http://www.asp.net



Sat, 01 Jan 2005 16:20:11 GMT  
 WebBrowser Control Problem , simulating submit button
I tried your code on my side (VB6+SP4) and it worked fine.

Please try to use the folowing code instead on your side and see if it
works:

With WebBrowser1
        .Document.Forms("form1").elements("text1").Value = email.Text
        .Document.All("form1").submit
End With

Gary

This posting is provided "AS IS", with no warranties, and confers no
rights. Enjoyed ASP.NET? http://www.asp.net



Sat, 01 Jan 2005 16:20:11 GMT  
 WebBrowser Control Problem , simulating submit button
JavaScript methods need parens...
       wb.Document.Forms("form1").submit()
Quote:

> Hi All,

> Hopefully someone may have come across this problem, I have a vb 6 form with
> webbrowser control (wb)
> at form load, wb navigates to a particular page and then should
> automatically fill in a form and simulate clicking of the submit button.
> I've used this technique before with no problem but for some reason today i
> can make it work, it keeps coming back with error 438 : object doesnt
> support this property or method and the line it falls over on is the submit
> line.  here is a snippet of code.

>       wb.Document.Forms("form1").elements("emailaddress").Value = email.Text
>       wb.Document.Forms("form1").submit

> the form is there, but it just cant see the submit method ? Any Ideas ?

> Any advice / words of wisdom appreciated...

> Dave Brown



Tue, 11 Jan 2005 23:50:55 GMT  
 WebBrowser Control Problem , simulating submit button
I have had this problem myself.  2 things you can try.

1) Most web pages only have one form so send a zero instead of the
name of the form.

   wb.Document.Forms(0).submit

2) Has the document fully loaded?  I usually set a boolean in the
DocumentComplete event and test that before I attempt to fill any
elements or submit anything.

-Tim

Quote:

> Hi All,

> Hopefully someone may have come across this problem, I have a vb 6 form with
> webbrowser control (wb)
> at form load, wb navigates to a particular page and then should
> automatically fill in a form and simulate clicking of the submit button.
> I've used this technique before with no problem but for some reason today i
> can make it work, it keeps coming back with error 438 : object doesnt
> support this property or method and the line it falls over on is the submit
> line.  here is a snippet of code.

>       wb.Document.Forms("form1").elements("emailaddress").Value = email.Text
>       wb.Document.Forms("form1").submit

> the form is there, but it just cant see the submit method ? Any Ideas ?

> Any advice / words of wisdom appreciated...

> Dave Brown



Mon, 17 Jan 2005 16:29:51 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. WebBrowser Control Problem , simulating submit button

2. WebBrowser Control Problem , simulating submit button

3. WebBrowser control submit button and focus

4. simulating Submit from an HTML form using Web Browser control in Visual Basic

5. Simulating the pressing of a "Submit" button on an HTML form using a WebBrowser Control in Visual Basic

6. Intercept the submit event in a form within the WebBrowser control

7. Complete and submit a form inside a webBrowser control page

8. submit button to operate another submit button

9. Web Browser control (how press submit buttons in code)

10. Web Browser control (how press submit buttons in code)

11. Offer: a wsh WebBrowser Control Control...

12. How do I disable the right mouse button over the webbrowser control ?How do I disable the right mouse button over the webbrowser control ?

 

 
Powered by phpBB® Forum Software