Scripting Guide
NAURTECH WEB BROWSER AND TERMINAL EMULATION FOR WINDOWS CE AND WINDOWS MOBILE
CETerm Scripting Guide Page 90
// Continue all other navigations
return 0;
}
4.7 THE ONNETCHECKFAILED EVENT
The OnNetCheckFailed event is fired if a “Network Check on Send” fails to
detect the host system and the Network Check Action is
“ida://IDA_SCRIPT_ON_NETCHECKFAILED”. Other Network Check Actions
are possible, including direct naming of an error URL. See the User Manual for
more information. Typically, this error handler will redirect the web browser to a
“file:” URL on the device for error recovery.
Syntax
function OnNetCheckFailed ( session, pendingURL )
session – index of browser session attempting navigation.
pendingURL – pending URL for navigation.
The pendingURL is the destination that the user requested but which has been
deferred because the host was not contacted. The event handler can re-try the
navigation.
Example
This example is nearly identical to the OnNavigateError handler except that
there is no error number in the pendingURL. This handler
shows how to redirect a Windows CE web browser to a static URL on the device.
/* OnNetCheckFailed */
function OnNetCheckFailed ( session, pendingURL )
{
// Save pendingURL in text 3x where x is session index
// This is required by CE 5.0 devices which do not pass
// parameters to a "file:" URL.
CETerm.SetProperty( "app.usertext.3" + session, pendingURL );
// Navigate to static error page
var b = CETerm.Session( session ).Browser;
b.Navigate( "file:///error.htm" );
}
See the OnNavigateError example above for additional details.