1030071002
asked on
i AM TRYING TO FILL THIS WEBSITE TEXT BOX WITH WEB CONTROL I HAVE TRYED MANY TASK AND NONE OF THEM WORK CAN ANY ONE HELP ME
i AM TRYING TO FILL THIS WEBSITE TEXT BOX WITH WEB CONTROL I HAVE TRYED MANY TASK AND NONE OF THEM WORK CAN ANY ONE HELP ME THIS VB 6
<LABEL><font class='protrace_text'>PRO TRACE</FONT></LABEL><br> <INPUT TYPE='text' SIZE=8 NAME='wpronumb' >
WEBSITE-TEXT-BOX.bmp
ASKER
i am tring to fill that text box with data for example "354654"
using control functions like these
example i have tryed these i did change the parends
WebBrowser.Document.forms. item(0).el ements("fi eld1").val ue = "myvalue"
For Each htmle In Browser.document.GetElemen tsByTagNam e("Input")
Select Case htmle.Name
Case "date"
'enter some data into the input field
htmle.InnerText = "160707"
Case "callsign"
htmle.InnerText = "QW12"
End Select
poststring = poststring & htmle.Name & "=" & htmle.InnerText & "&"
Next
webBrowser1.Document.GetEl ementById( "FirstName ").SetAttr ibute("val ue", "John")
using control functions like these
example i have tryed these i did change the parends
WebBrowser.Document.forms.
For Each htmle In Browser.document.GetElemen
Select Case htmle.Name
Case "date"
'enter some data into the input field
htmle.InnerText = "160707"
Case "callsign"
htmle.InnerText = "QW12"
End Select
poststring = poststring & htmle.Name & "=" & htmle.InnerText & "&"
Next
webBrowser1.Document.GetEl
ASKER
Okay I found out I cant get by id so i am trying to get by
getElementsByTagName
please help
<CENTER>
<TABLE WIDTH="70%">
<TR>
<TD ALIGN='RIGHT'><B> Probill #1:</B></TD>
<TD><INPUT TYPE='text' NAME='wpro1' VALUE = '' SIZE=10></TD>
<TD ALIGN='RIGHT'><B> Probill #2:</B></TD>
<TD><INPUT TYPE='text' NAME='wpro2' VALUE = '' SIZE=10></TD>
<TD ALIGN='RIGHT'><B> Probill #3:</B></TD>
<TD><INPUT TYPE='text' NAME='wpro3' VALUE = '' SIZE=10></TD>
</TR>
getElementsByTagName
please help
<CENTER>
<TABLE WIDTH="70%">
<TR>
<TD ALIGN='RIGHT'><B> Probill #1:</B></TD>
<TD><INPUT TYPE='text' NAME='wpro1' VALUE = '' SIZE=10></TD>
<TD ALIGN='RIGHT'><B> Probill #2:</B></TD>
<TD><INPUT TYPE='text' NAME='wpro2' VALUE = '' SIZE=10></TD>
<TD ALIGN='RIGHT'><B> Probill #3:</B></TD>
<TD><INPUT TYPE='text' NAME='wpro3' VALUE = '' SIZE=10></TD>
</TR>
ASKER
Tagname ----> tbody
http://64.80.57.250/cgi-bin/cgiip.exe/Wservice=wsbroker1/logo-frame.r?language=&seskey=kimIbpiulRfgbdba"
<input type="text" name="wpro1" size="8">
<input type="text" name="wpronumb" size="8">
http://64.80.57.250/cgi-bin/cgiip.exe/Wservice=wsbroker1/logo-frame.r?language=&seskey=kimIbpiulRfgbdba"
<input type="text" name="wpro1" size="8">
<input type="text" name="wpronumb" size="8">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
any one does not matter
I have test application (sorry cant post it here) that allows me to inspect all open web browser windows and read the forms and elements
I know what your trying to do so here are some pointers
I have added the "Microsoft HTML Object Library" to the project "MSHTML.TLB"
You can work fast with the elements if you break it down to so variables but you dont have to
eg:
Dim oDocument As HTMLDocument
Dim oForm As HTMLFormElement
Dim oFormInput As HTMLInputElement
Dim oFormSelect As HTMLSelectElement
Dim oFormArea As HTMLTextAreaElement
Dim oFormButton As HTMLInputButtonElement
Then you can break down each element of the document to the variables to inspect them alot easier
eg:
Set oDocument = WebBrowser.Document
Set oForm = oDocument.Forms.Item(0) ' assign to the first form in the document
debug.print oForm.item("userid").value
or alter a value in the form
oForm.item("userid").value = "12345"
I know what your trying to do so here are some pointers
I have added the "Microsoft HTML Object Library" to the project "MSHTML.TLB"
You can work fast with the elements if you break it down to so variables but you dont have to
eg:
Dim oDocument As HTMLDocument
Dim oForm As HTMLFormElement
Dim oFormInput As HTMLInputElement
Dim oFormSelect As HTMLSelectElement
Dim oFormArea As HTMLTextAreaElement
Dim oFormButton As HTMLInputButtonElement
Then you can break down each element of the document to the variables to inspect them alot easier
eg:
Set oDocument = WebBrowser.Document
Set oForm = oDocument.Forms.Item(0) ' assign to the first form in the document
debug.print oForm.item("userid").value
or alter a value in the form
oForm.item("userid").value
If oForm.Item("userid").nodeN ame = "INPUT" Then
Set oFormInput = oForm.Item("userid")
oFormInput.id
oFormInput.type
oFormInput.value
Set oFormInput = oForm.Item("userid")
oFormInput.id
oFormInput.type
oFormInput.value
I posted my source on a public site so you can download and play with it from there
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=60699&lngWId=1
I built this some time ago but it should work fine
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=60699&lngWId=1
I built this some time ago but it should work fine
ASKER
lhjbgvkhjb
ASKER
.
Maybe you can list what you have tried?