WebBrowser Control Problem , simulating submit button
Author |
Message |
Dave Brow #1 / 5
|
 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 |
|
 |
Max[M #2 / 5
|
 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:08:16 GMT |
|
 |
Max[M #3 / 5
|
 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:08:16 GMT |
|
 |
David Fore #4 / 5
|
 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 |
|
 |
Timb #5 / 5
|
 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 |
|
|
|