Solved

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

Posted on 2010-09-03
13
337 Views
Last Modified: 2013-12-26
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' >

Open in new window

WEBSITE-TEXT-BOX.bmp
0
Comment
Question by:1030071002
  • 6
  • 5
13 Comments
 
LVL 12

Expert Comment

by:GMGenius
ID: 33598984
Not sure I understand
Maybe you can list what you have tried?
0
 

Author Comment

by:1030071002
ID: 33601212
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).elements("field1").value = "myvalue"
For Each htmle In Browser.document.GetElementsByTagName("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.GetElementById("FirstName").SetAttribute("value", "John")
 
 

 
0
 

Author Comment

by:1030071002
ID: 33605466
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>
0
 

Author Comment

by:1030071002
ID: 33605836
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">

0
 
LVL 12

Accepted Solution

by:
GMGenius earned 500 total points
ID: 33609664
What development application are you using?
VB.NET or VB6?
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:1030071002
ID: 33614115
any one does not matter
 
0
 
LVL 12

Expert Comment

by:GMGenius
ID: 33615879
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"
0
 
LVL 12

Expert Comment

by:GMGenius
ID: 33616016
If oForm.Item("userid").nodeName = "INPUT" Then
Set oFormInput = oForm.Item("userid")
oFormInput.id
oFormInput.type
oFormInput.value
0
 
LVL 12

Expert Comment

by:GMGenius
ID: 33651581
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
0
 

Author Comment

by:1030071002
ID: 33818977
lhjbgvkhjb
0
 

Author Closing Comment

by:1030071002
ID: 33818984
.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now