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
Hello Dave,

Could you let me know which page are you connecting to? If the name of the
submit button is submit like <input TYPE="SUBMIT" name="Submit"
value="Go">, it will cause such a problem. The workaround is call click
like wb.Document.Forms("form1").submit.click

Hope this helps.

Regards,
Max
==========================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

|Newsgroups:
comp.lang.basic.visual,comp.lang.visual.basic,microsoft.public.scripting.vbs
cript,microsoft.public.vb,microsoft.public.vb.bugs,microsoft.public.vb.contr
ols,microsoft.public.vb.controls.internet
|Subject: 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
|
|
|
|
|
|
|



Sat, 01 Jan 2005 17:07:40 GMT  
 WebBrowser Control Problem , simulating submit button
Hello Dave,

Could you let me know which page are you connecting to? If the name of the
submit button is submit like <input TYPE="SUBMIT" name="Submit"
value="Go">, it will cause such a problem. The workaround is call click
like wb.Document.Forms("form1").submit.click

Hope this helps.

Regards,
Max
==========================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

|Newsgroups:
comp.lang.basic.visual,comp.lang.visual.basic,microsoft.public.scripting.vbs
cript,microsoft.public.vb,microsoft.public.vb.bugs,microsoft.public.vb.contr
ols,microsoft.public.vb.controls.internet
|Subject: 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
|
|
|
|
|
|
|



Sat, 01 Jan 2005 17:07:40 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. SUBMIT form with 3 different submit buttons - error

7. Submitting Form WITHOUT Submit Button

8. submit with out submit button

9. SUBMIT form with 3 different submit buttons - error

10. What fires the submit action of a form without a submit button

11. Submitting Form WITHOUT a Submit Button

12. Submitting form without submit button...

 

 
Powered by phpBB® Forum Software