Results 1 to 3 of 3

Thread: Retrieve text from a "TD" HTML element

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Hong Kong
    Posts
    38

    Question

    I am writing a program to retrieve data from a web page which contains data in <TD>s in a <TABLE> tag. I am using webbrowser to get the document and already got the html element of the td. But the data is separated by a <BR> which actually represents 2 fields. The coding of the problem html is :
    <td nowrap align=center valign=middle width=30>
    <font size=2 color="#009933">226<br>
    <font size=2 color="#0000ff">60</td>
    If I use "innertext" to get it, I got 22660. The problem is that there is no way to distinguish the 2 fields as 2, 2660 or 22,660 or 226,60 or 2266,0.

    Is these a method for retrieving the field before and after a <BR> ?

    Anyone knows how to use the getadjacenttext method ?

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    You will probably have to use innerHTML and parse the text
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    monte96_@hotmail.com
    monte96@vbgarage.com


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Hong Kong
    Posts
    38
    I solved it by using instr and mid function and the <br> was represented by vbcrlf.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width