Results 1 to 5 of 5

Thread: Need a little help!

  1. #1

    Thread Starter
    Addicted Member Buy2easy.com's Avatar
    Join Date
    Jul 2002
    Posts
    200

    Need a little help!

    I am using axwebbrowser1 how can i detect if a page is not loaded. Um....how can i detect if the url that i wanted the browser to go to does not show up...say i know for a fact that the page is there but sometimes the browser shows the 'error page could not be found' page and i want to be able to detect that and automatically refresh the page to show it how can this be done

  2. #2

    Thread Starter
    Addicted Member Buy2easy.com's Avatar
    Join Date
    Jul 2002
    Posts
    200
    bump

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    I think you will need to get the html from the browser control. The way you would do that *I think* is using something like:
    mystring = axwebbrowser1.Document

    Then you need to search the string for 'error page could not be found', if it is in there, then you know the page didn't load right.

  4. #4

    Thread Starter
    Addicted Member Buy2easy.com's Avatar
    Join Date
    Jul 2002
    Posts
    200
    thanks that is a good idea

  5. #5
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Well, what I gave you before just might not be that easy...

    I was just now working with it trying to get the document, and I didn't get what I wanted. After digging around, I found what I needed.

    First, you need to add a reference the the mshtml library.

    Then, use something like this:

    IHTMLDocument2 obj = webbrowser.document

    somestring = obj.innerHTML

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