|
-
Mar 28th, 2009, 10:39 PM
#1
Thread Starter
Lively Member
WebBrowser / Submitting A Form
I am having trouble submitting a form with my program which is using the WebBrowser control.
Code:
WebBrowser.Document.All("follow").InvokeMember("click")
I tried this but it did not work. The result is that the WebBrowser displays "This program cannot display the webpage" error page. The problem I think, is that the page is using javascript when it comes to submitting the form.
This is the code for the submit button:
Code:
<input type="button" onclick="submitIt()" value="Follow" name="follow"/>
And this is the javascript for the onclick="submitIt()"
Code:
function submitIt(){
document.formx.submit();
}
So how can I submit this form? Is there any way to invoke that javascript submitIt() method through VB.net? Or am I missing a better way to do this?
Last edited by Aeterna; Mar 28th, 2009 at 10:57 PM.
-
Mar 29th, 2009, 06:08 PM
#2
Thread Starter
Lively Member
Re: WebBrowser / Submitting A Form
Nobody has any ideas on this?
-
Mar 30th, 2009, 01:03 AM
#3
Re: WebBrowser / Submitting A Form
You shouldn't name your controls as their classes.
Code:
WebBrowser.Document.All.Item("follow").InvokeMember("click")
-
Jun 6th, 2009, 04:45 PM
#4
New Member
Re: WebBrowser / Submitting A Form
Try navigating webbrowser with a javscript :P
Code:
javascript:document.formx.submit();
Or
Code:
javascript:document.formx.submit()
-
Jun 6th, 2009, 05:34 PM
#5
New Member
Re: WebBrowser / Submitting A Form
You could try this code:
Code:
Webbrowser1.Document.GetElementById("follow").InvokeMember("Click")
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|