It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Visual Basic 2010 with HTML Forms

Moderator: dafunkymunky

Visual Basic 2010 with HTML Forms

Postby sanjon on Wed Apr 27, 2011 7:34 pm

Hello, I made an application that goes to a website and submits a form. I managed to do everything except for pressing the submit button. I looked around the internet for hours but couldn't find anything. Here is my code:

Code: Select all
Dim i As Integer
For i = 0 To WebBrowser1.Document.GetElementsByTagName("input").Count - 1
   If WebBrowser1.Document.GetElementsByTagName("input").Item(i).GetAttribute("type") = "submit" Then
           If WebBrowser1.Document.GetElementsByTagName("input").Item(i).GetAttribute("value") = "Deposit" Then
                   WebBrowser1.Document.GetElementsByTagName("input").Item(i).RaiseEvent("onclick")
                End If
         End If


I used "RaiseEvent("onclick")" but I am not exactly sure how to use it. Any help is appreciated.
sanjon
 
Posts: 40
Joined: Sun Dec 05, 2010 6:20 pm

Re: Visual Basic 2010 with HTML Forms

Postby sanjon on Fri Apr 29, 2011 2:27 pm

I found the answer. If anyone has the same question just tell me and I will post the answer.
sanjon
 
Posts: 40
Joined: Sun Dec 05, 2010 6:20 pm


Who is online

Users browsing this forum: No registered users and 3 guests