|
-
Sep 4th, 2007, 10:15 AM
#1
Thread Starter
Lively Member
[2005] AxWebBrowser Control -Fill in Textbox inside an HTML Table
Hi everyone, got a small question I'm hoping someone can help me out with. I found a post here by Kleinma http://vbforums.com/showthread.php?t...ght=webbrowser. Well the code there has gotten me pretty much all the way done. However, I've been jumping back and forth between the AxWebbrowser control (which is in the example used) and the Webbrowser control. So far I'm much further along in the code with the AxWebBrowser control and would like to stick with it.
That said, i found in the example above how to fill in a textbox that on a web page. But I'm running into a problem where i cant figure out how to fill in a textbox thats inside an HTML Table? For some reason the code below only works on objects that are outside a table object. Or at least thats what i think is happening.
Can anyone direct me in the right direction, or post a snippet of code to accomplish this? I really appreciate any help!!
Code:
Code:
DirectCast(Me.GetCurrentWebForm.item("address"), mshtml.HTMLInputElement).value = MyClientAddress
'Function
Private Function GetCurrentWebForm() As mshtml.HTMLFormElement
Try
If GetCurrentWebDoc.forms.length > 0 Then
Return DirectCast(GetCurrentWebDoc.forms.item(0), mshtml.HTMLFormElement)
Else
Return Nothing
End If
Catch ex As Exception
Return Nothing
End Try
End Function
And here is the HTML page containing the textbox I'm trying to fill in. It's the Address, city, state ones I'm interested in.
http://stevemorse.org/jcal/latlon.php
-
Sep 4th, 2007, 06:54 PM
#2
Re: [2005] AxWebBrowser Control -Fill in Textbox inside an HTML Table
 Originally Posted by Mark Douglas
Hi everyone, got a small question I'm hoping someone can help me out with. I found a post here by Kleinma http://vbforums.com/showthread.php?t...ght=webbrowser. Well the code there has gotten me pretty much all the way done. However, I've been jumping back and forth between the AxWebbrowser control (which is in the example used) and the Webbrowser control. So far I'm much further along in the code with the AxWebBrowser control and would like to stick with it.
That said, i found in the example above how to fill in a textbox that on a web page. But I'm running into a problem where i cant figure out how to fill in a textbox thats inside an HTML Table? For some reason the code below only works on objects that are outside a table object. Or at least thats what i think is happening.
Can anyone direct me in the right direction, or post a snippet of code to accomplish this? I really appreciate any help!!
Code:
Code:
DirectCast(Me.GetCurrentWebForm.item("address"), mshtml.HTMLInputElement).value = MyClientAddress
'Function
Private Function GetCurrentWebForm() As mshtml.HTMLFormElement
Try
If GetCurrentWebDoc.forms.length > 0 Then
Return DirectCast(GetCurrentWebDoc.forms.item(0), mshtml.HTMLFormElement)
Else
Return Nothing
End If
Catch ex As Exception
Return Nothing
End Try
End Function
And here is the HTML page containing the textbox I'm trying to fill in. It's the Address, city, state ones I'm interested in.
http://stevemorse.org/jcal/latlon.php
I will answer in my thread you linked from above.
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
|