|
-
Jul 19th, 2006, 09:59 AM
#1
Thread Starter
New Member
[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.
-
Jul 19th, 2006, 10:10 AM
#2
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
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jul 19th, 2006, 11:59 AM
#3
Thread Starter
New Member
Re: web browser control question
-
Jul 19th, 2006, 12:21 PM
#4
Re: web browser control question
Woah! I didnt know lives were at stake with this one!!
phew!

JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jul 19th, 2006, 12:22 PM
#5
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!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
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
|