Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On a Webbrowser control, how can you tell when a page was not located?

Status
Not open for further replies.

BobTheMad

Programmer
Jun 11, 1999
81
US
I am designing a web browser app for a friend who works on-line a lot. She needs to be notified (via a .wav file that I have programmed in) whenever the browser is not able to
locate the page. You know, one of those...

(The page cannot be displayed - The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings. )

... messages

Any suggestions?

Thanks in advance Thought for the day: Beware of Gods who cannot laugh...
 
Any suggestions?? Thought for the day: Beware of Gods who cannot laugh...
 
You can try looking to see if the title matches that of the unfound pages title.

Once your web browser has loaded the page, get the following

if Webbrowser1.document.title = "Page cannot be displayed" then
play sound
end if

Don't forget that this must only occur within the Webbrowser1_Document complete event at best or Webbrowser1_Download complete at worst.

Hope this helps,


James.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top