CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    How Can I get an Element from a html file,which I using Scriptlet control to link it.

    In my vb application,I want to get a tag from a http file.So I use Scriptlet control,it can get the web,but I cann't control the tag which in the http file.


    Thanks for any suggestion!


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: How Can I get an Element from a html file,which I using Scriptlet control to link it.

    you don't need the scriptlet control, but you need the webbrowser control and mshtml.dll (reference) to reference the DOM.
    then code like this

    private Sub Command2_Click()
    w.Navigate "http://yoururl"

    End Sub

    private Sub w_DocumentComplete(byval pDisp as Object, URL as Variant)
    Dim d as HTMLDocument
    set d = w.Document
    ' to get an attribute of a certain HTML element
    d.all.t.tagName ' gets tagName of element with id "t"
    End Sub





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

Featured