[RESOLVED] web browser control question
I am attempting to click a button on a web page through vb. I am using
WebBrowser.Document.documentElement.all("textboxname").Value = "something"
to fill in text boxes. The button i need to click displays like this in the HTML:
<INPUT tabIndex=15 type=image height=22 alt=submit width=46 src="ts_btn_submit.gif" border=0>
How would I click this button using WebBrowser.Document.documentElement.all, or any other way...I have been using SendKeys, I don't like this option because it counts on the form in focus which isn't always the case. and i can't post it myself because of the html formatting...i just need to figure out how to click this button....
who ever takes pitty on me and helps out...thanks.
Re: web browser control question
if this doesnt work.. (which i doubt it will)
Webbrowser1.Document.All.Submit.Click
then you will need to loop through all the input elements
VB Code:
Dim I_Elem as Object
On Error Resume next
For each I_Elem in Webbrowser1.Document.GetElementsByTagName("input")
If I_Elem.alt = "submit" Then
I_Elem.Click
Exit For
End If
Next
Re: web browser control question
Re: web browser control question
Woah! I didnt know lives were at stake with this one!!
phew!
;)
http://www.vbforums.com/
Re: web browser control question
Can you do us a favor?
Click thread tools > Mark Thread resolved
that will let everyone know u have had your question answered.
Thanks!