Consulting

Results 1 to 2 of 2

Thread: document.iframes does not work

  1. #1
    VBAX Newbie
    Joined
    Feb 2014
    Posts
    4
    Location

    document.iframes does not work

    Hi. As long as I've seen the vollowing code should work:


    Sub iFrameInnerHTML()
    Const cURL = "https://invest.ameritrade.com/grid/p/login?logout=L&promo=3"
    Set IE = New InternetExplorer
    IE.Visible = True
    IE.Navigate cURL

    Do While IE.READYSTATE <> READYSTATE_COMPLETE Or IE.Busy: DoEvents: Loop

    Dim iFrm As HTMLIFrame
    Set iFrm = IE.Document.frames(1).Document.getElementById("noscript-frame")
    Debug.Print iFrm.Document.body.innerText

    End Sub


    But I obain an error in "set iFrm = ...." line.


    Any help would be appreciated.
    Alvaro de Leon

  2. #2
    as far as i can tell, as that element is within a noscipt block, it will only exist in the case a a browser with scripting disabled (this can be tested, by turning off scripting)
    it would appear that the login form is contained in a data-dojo (mystry to me)
    no frames or forms appear to be contained within the main document

Tags for this Thread

Posting Permissions

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