Results 1 to 2 of 2

Thread: Webbrowser -> element exists ?

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2004
    Location
    Chennai,India
    Posts
    40

    Question Webbrowser -> element exists ?

    I am using Webbrowser control to fill few values from database.

    VB Code:
    1. Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    2.  
    3.         Dim HTML As HTMLDocument
    4.  
    5.      If (pDisp Is WebBrowser1.Application) Then
    6.    
    7.          Set HTML = WebBrowser1.Document
    8.  
    9.         HTML.All.Item("User").Value = "userid"
    10.     End if
    11.  
    12. end sub


    In the document complete event i am filling up few text box values.

    Is there any way to check if the element exists in the page or not ?

    For example only if the "User" element is found i need to fill the value.

    Please help..

  2. #2
    Addicted Member
    Join Date
    Mar 2002
    Location
    Lithuania
    Posts
    165

    Re: Webbrowser -> element exists ?

    VB Code:
    1. If (Not HTML.All.Item("User") Is Nothing) Then
    2.  'This should work
    3. end if
    P.S. Sorry for my poor English...

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