Solved

offline web application

Posted on 2014-03-25
3
134 Views
Last Modified: 2014-04-02
Hi, on a incorporate web application, html/php/javascript - how can a custom error be displayed in the clients browser when network connectivity to web server hosting the app is lost. All pcs are running IE10/11. Javascript detects connectivity but cannot access a local file. appreciate some advise.
0
Comment
Question by:nevyana2006
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 35

Assisted Solution

by:gr8gonzo
gr8gonzo earned 250 total points
ID: 39953672
IE should be able to access a local file just fine using the file:// protocol as a URL:

C:\path\to\error_page.html =
file:///C:/path/to/error_page.html

//network_server/path/to/error_page.html =
file://network_server/path/to/error_page.html

Just create a custom error page, save it in the appropriate spot (either locally or on a centrally-shared server) and when Javascript detects the loss, just display an iframe with the src attribute set to the custom error page with that file:// URL.
0
 
LVL 27

Accepted Solution

by:
skullnobrains earned 250 total points
ID: 39961013
if the javascript is loaded, something like

document.write('connection lost');

or to write to a specific location

document.getElementById('id_of_box_that_will_contain_the_message').innerHTML=('connection lost');

you can also use modal windows, or simply alert() to display a message in js

--

if your js is loaded from the server and the server is down, simple answer is you can't

like mentioned above, hte browser can access a local file, and so can javascript through the httpquery() family functions. this requires that XSS pseudo-security does not get in the way
0
 

Author Comment

by:nevyana2006
ID: 39973351
thank you,
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can't get video to center on page 2 46
Expanding/Collapsing Tree on SharePoint List 29 68
Can't find an open element in HTML 5 55
Sleep one hour while in loop 4 44
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question