Thanks for the sample code, Aaron.  Should I be able to query the
DOMNote property in the immediate window (invoked from IE)?  I tried the
following code:

For Each oLine in BrowseMode.Lines : Print TypeName(oLine.DOMNode) : Next

I got "Nothing" for each line.

Jamal
On
Mon, 28 Jul 2008, Aaron Smith wrote:

> Date: Mon, 28 Jul 2008 15:58:40 -0400
> From: Aaron Smith <[EMAIL PROTECTED]>
> Reply-To: [email protected]
> To: [email protected]
> Subject: Re: DOMNode property
>
> I use this example to get DOMNodes from a given page when the BrowseMode
> buffer changes. I'll warn you ahead of time -- it's slower than my
> grandmother running through molasses (because of the output debug):
>
> ConnectEvent BrowseMode, "OnStateChange", "BrowseModeStateChange"
>
> Sub BrowseModeStateChange(bmState)
>       OutputDebugString "Browse Mode State Change: " & bmState & vbCrLf
>       On Error Resume Next
>       If bmState = bmsActive Then
>               ' Get the URL of the active browse mode buffer
>               Dim bmLines : Set bmLines = BrowseMode.Lines
>               If Not bmLines Is Nothing Then
>                       If bmLines.Count > 0 Then
>                               Dim bmLine
>                               For Each bmLine In bmLines
>                                       If Not bmLine.DOMNode Is Nothing Then
>                                               Set dn = bmLine.DOMNode
>                                               OutputDebugString "Found one! " 
> & bmLine.Index & ": " &
> dn.nodeName & " = " & dn.nodeType & " = " & dn.nodeValue & vbCrLf
>                                       End If
>                               Next
>                       End If
>                       Set bmLines = Nothing
>               End If
>       End If
>
>       On Error GoTo 0
> End Sub
>
> DOMNodes are beastly little creatures that, after an extended period of
> exposure, can cause you to strike the person next to you with a blunt
> object. I strongly recommend coding them, alone, or at least while
> you're sitting next to Mike.
>
> Aaron
>
> Jamal Mazrui wrote:
> > Testing with the Immediate Window script, this property seems to return
> > Nothing for every BrowseMode line.  The scripting documentation refers me
> > to MSDN, but can we have at least one example of using the DOMNode
> > property?
> >
> > Jamal
> >
>
> --
> To insure that you receive proper support, please include all past
> correspondence (where applicable), and any relevant information
> pertinent to your situation when submitting a problem report to the GW
> Micro Technical Support Team.
>
> Aaron Smith
> GW Micro
> Phone: 260/489-3671
> Fax: 260/489-2608
> WWW: http://www.gwmicro.com
> FTP: ftp://ftp.gwmicro.com
> Technical Support & Web Development
>

Reply via email to