Joe Kasavage
Joe Kasavage

Reputation: 522

Webview Status - Google Chrome

Here is a brief project description:

I have created a packaged application for Chrome that allows members to scan in using a serial barcode scanner. These members have pictures on different servers based on their identification numbers. I am pulling the pictures in using a webview and it works good until one of the members does not have a picture on file. This displays an ugly 404 error in the webview.

I can not seem to find out how to get the status of a webview. Is there a way for me to find the status of the webview so that on the event of a 404 error I can dynamically change the content?

Upvotes: 0

Views: 148

Answers (1)

Marc Rochkind
Marc Rochkind

Reputation: 3740

Two approaches: As sowbug says, you can just display the image directly. How you do that is explained here: chrome packaged app image access. Or, if you really want to use a webview, you can determine that the image exists first via a call using XMLHttpRequest. The URL above explains how to do that also.

Upvotes: 1

Related Questions