Click here to Skip to main content
15,895,709 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionFTP Download problems Pin
CodecCodes28-May-09 15:32
CodecCodes28-May-09 15:32 
AnswerRe: FTP Download problems Pin
Dave Kreskowiak28-May-09 17:33
mveDave Kreskowiak28-May-09 17:33 
Questionworksheetfunction.match Pin
yamanbas28-May-09 8:41
yamanbas28-May-09 8:41 
QuestionGet data off a grid on a web page Pin
MarDude28-May-09 5:54
MarDude28-May-09 5:54 
AnswerRe: Get data off a grid on a web page Pin
Jay Royall28-May-09 6:14
Jay Royall28-May-09 6:14 
GeneralRe: Get data off a grid on a web page Pin
MarDude28-May-09 7:11
MarDude28-May-09 7:11 
GeneralRe: Get data off a grid on a web page Pin
Jay Royall28-May-09 8:22
Jay Royall28-May-09 8:22 
GeneralRe: Get data off a grid on a web page Pin
MarDude28-May-09 13:33
MarDude28-May-09 13:33 
Thanks again.

I looked at the IFRAME source on the homepage, this is what i found:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- 
  -- UserData.asp
  --
  -- This page acts as a host page to all the user data that will be used by the application
  -- 
  -- IMPORTANT: This page MUST reside in a static folder (e.g. outside 5.0.05.46) as user data 
  -- is only available in the same directory. If we move this file to a different directory, 
  -- previously saved user data would be lost.
  --
  -- IMPORTANT: The page using UserData must not contain a frame named "frameUserData"
  -- 
  -- Setup:
  -- 1. Include UserData.js
  --    <script language="javascript" src="/5.0.05.46/Include/UserData.js"></script>
  -- 2. Create the iframe that contains this page. There are two ways of doing this.
  --    a) Through javascript. Call CreateUserDataFrame() once before using 
  --       any other functions in UserData.js
  --
  --    or
  --
  --    b) Through html. Have the following html iframe:
  --       <iframe src="/Tools/UserData.asp" id="frameUserData" style="display: none;" />
  --
  -- Usage:
  --
  --
  -->
<HTML xmlns="http://www.w3.org/1999/xhtml" >
<HEAD>
    <TITLE>User Data Utility - Host Page</TITLE>
</HEAD>
<BODY style="behavior: url('#default#userData');">
</BODY>
</HTML>


I don't know where it goes next. I tried running the following code when I get to the page:
Private Function PrintDomBegin(hDoc As HTMLDocument) As Long

    Dim str As String
    Dim str2 As String
    Dim ElemColl As Object
    'Dim ElemColl As HTMLElementCollection
    
    If Not hDoc Is Nothing Then
        frmDetail.List2.Clear
        Set ElemColl = hDoc.getElementsByTagName("HTML")
        str = PrintDom(ElemColl, str2, 0, 0)
        frmDetail.Text1 = str
    End If
    
    'PrintDomBegin = ElemColl.Count

End Function

Private Function PrintDom(ByVal ElemColl As Object, ByRef ReturnStr As String, ByVal lngDepth As Long, lngIndex As Long) As String
    
    Dim str As String
    Dim strKey As String
    Dim strElemName As String
    Dim Elem As HTMLDTElement
    
    For Each Elem In ElemColl

        lngIndex = lngIndex + 1
        strKey = "F: " & Trim(CStr(mlngFrameIndex)) & " - D: " & Trim(CStr(lngDepth)) & " #" & Trim(CStr(lngIndex))
        mcol.Add Elem, strKey
        'frmDetail.List1.AddItem strKey
        
        strElemName = Elem.getAttribute("ID")
        If strElemName = "" Then
            strElemName = "" & Elem.getAttribute("name")
            If strElemName = "" Then
                strElemName = "<no name>"
            End If
        End If

        'If strElemName = "txtLogin" Then Debug.Print Elem.outerHTML

        str = Space(lngDepth * 4)
        str = str & (strElemName & ": " & Elem.tagName & "(Level " & lngDepth & ")")
        ReturnStr = ReturnStr & str & vbCrLf
        frmDetail.List2.AddItem str
        frmDetail.List2.ItemData(frmDetail.List2.NewIndex) = mlngFrameIndex * 1000000 + lngDepth * 1000 + lngIndex
        frmDetail.lblItems = "Count = " & frmDetail.List2.ListCount

        If (Elem.canHaveChildren) Then
            PrintDom Elem.children, ReturnStr, lngDepth + 1, lngIndex
        End If

        str = ""
    Next

    PrintDom = ReturnStr
End Function


I can't get it to work with ElemColl decalred as HTMLElementCollection, but I don't think that it would make much difference. I then searched all the ElemColl objects' properties of .innerHTML, innerText, outerHTML & outerText and can't find anything that is in the grid. I don't know if tis helps, but the grid isn't completely populated when it first comes up, some data is there (that I can't find) but scroll down a little bit and it loads more rows.

Can data be on the screen and not accessable?
Does getElementsByTagName("HTML") return ALL the HTML?
Is there somewhere else I can look?
I don't know what I am missing and where.
GeneralRe: Get data off a grid on a web page Pin
Jay Royall28-May-09 22:01
Jay Royall28-May-09 22:01 
GeneralRe: Get data off a grid on a web page Pin
MarDude29-May-09 6:48
MarDude29-May-09 6:48 
QuestionHow to Create a Dynamic Page in VB and Print the same. Pin
Kaushal Arora28-May-09 1:55
Kaushal Arora28-May-09 1:55 
AnswerRe: How to Create a Dynamic Page in VB and Print the same. Pin
Dave Kreskowiak28-May-09 6:44
mveDave Kreskowiak28-May-09 6:44 
GeneralRe: How to Create a Dynamic Page in VB and Print the same. Pin
Kaushal Arora28-May-09 17:47
Kaushal Arora28-May-09 17:47 
GeneralRe: How to Create a Dynamic Page in VB and Print the same. Pin
DidiKunz28-May-09 23:14
DidiKunz28-May-09 23:14 
QuestionHow to connect the sql sever to pda device. Pin
PandiaRajan_P28-May-09 1:49
PandiaRajan_P28-May-09 1:49 
AnswerRe: How to connect the sql sever to pda device. Pin
Dave Kreskowiak28-May-09 4:25
mveDave Kreskowiak28-May-09 4:25 
Questioncrysatl report for ms access Pin
hrishiS27-May-09 23:33
hrishiS27-May-09 23:33 
QuestionSend SMS from a VB6 Application Pin
she-Developer27-May-09 21:42
she-Developer27-May-09 21:42 
AnswerRe: Send SMS from a VB6 Application Pin
Baran M28-May-09 0:59
Baran M28-May-09 0:59 
QuestionCopy Append to Clipboard Pin
gonen5227-May-09 18:35
gonen5227-May-09 18:35 
AnswerRe: Copy Append to Clipboard Pin
Anubhava Dimri27-May-09 20:10
Anubhava Dimri27-May-09 20:10 
GeneralRe: Copy Append to Clipboard Pin
gonen5227-May-09 20:42
gonen5227-May-09 20:42 
AnswerRe: Copy Append to Clipboard Pin
Mycroft Holmes27-May-09 22:14
professionalMycroft Holmes27-May-09 22:14 
AnswerRe: Copy Append to Clipboard Pin
oikoik14-Jan-10 19:46
oikoik14-Jan-10 19:46 
Questionstart monitor external application problem with shared folder Pin
nico200727-May-09 14:05
nico200727-May-09 14:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.