Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Webbrowser control and textbox

Status
Not open for further replies.

alehawk

Programmer
Jun 18, 2003
332
0
0
AR
Hi!
I got a form with a webbrowser control which has a multiline textbox (textfield) anda ok button (submit), and over the form I got a text1.text
Is there anyway I can copy the texfield contects to the text1.text when I press the ok button on the html document on the webbrowser control?
Tnx!
 
Never mind I found how to get the values from the txtfield...
 
Read Value:
Code:
MyText = WebBrowser1.Document.Forms("FormName").Item("TextField").Value

Write Value:
Code:
WebBrowser1.Document.Forms("FormName").Item("TextField").Value = "Text"

hope this helps ;-)

Have Fun, Be Young... Code BASIC
-Josh

cubee101.gif


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
I found this function:

Public Function GetWebValue(WebBrowser As WebBrowser, value As String)
'Checking if a Frame Page is being displ
' ayed
On Error GoTo EndStuff:
Set Lkpweb = WebBrowser.Document



Set Lkpweb = WebBrowser.Document.All
On Error Resume Next
GetWebValue = Lkpweb.Item(CStr(value)).value
'' MsgBox Lkpweb.Item(CStr(value)).value
'' End If
EndStuff:
End Function

You call it like:
Text4.Text = GetWebValue(webbrowsercontrolname, "mywebtextfield")

Cya!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top