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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error when opening non-HTML file

Status
Not open for further replies.

eilidh

Programmer
Jul 2, 2001
1
GB
Hi,

I have a web page which allows users to view corporate documents, eg MS Word, PowerPoint, Adobe Acrobat files etc. I use window.navigate(url) to open the file, which works fine if the user's PC has the required application installed, but if not I get a 'Page cannot be displayed' error message. Is there any way I can either test if the required application is installed, or be informed of the error so I can handle it better?

Thanks in advance for any help,

Eilidh
 
try using the application to view an online web page, eg if it will allow you. If that works, and some of the users can see the page, but this one cant, check that the right path to the file is put in...
eg. \\server\files\webfiles\yourpage.html Jay~

"I have to think of a funny footer to
put in here!!!???"

~KeyTech
 
The only way to check for sure whether an application is present would be to check specific Registry keys. That would make you real unpopular if users found out! As far as I know, because the error is reported to the browser, not the page, it is not possible to catch a Page cannot be displayed, but I am open to being corrected.

Maybe you could provide links to download viewer programs like Acrobat reader, along with a disclaimer "You will need program x to view this document". There is a Word viewer program available, don't know about Powerpoint.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top