SiteKiosk Documentation
One Step Back

CheckInternetConnection Method




The CheckInternetConnection method checks and returns whether an internet connection exists.


Syntax

    SiteKiosk.Network.CheckInternetConnection(server)
    
Parameters
    serverString containing the name of the server to reach.
Return Value
    None.
Remarks
    This methods causes an script error if no connnection exists. Use try / catch.
    The server parameter should only contain the hostname without a protocol.
Examples
    The following example pings the host 'www.google.com' to check for an internet connection.

    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    var server = "www.google.com";
    
    SiteKiosk.Network.CheckInternetConnectionComplete = OnCheckInternetConnectionComplete;
    SiteKiosk.Network.CheckInternetConnection(server);
    
    function OnCheckInternetConnectionComplete(ab_Status, al_ErrorCode)
    {
    	alert(ab_Status);
    }
    </SCRIPT>
    

Applies to
    SiteKiosk v6.5 (and later versions).

Back to topVolver arriba

© 1997-2011 PROVISIO - Aventura, EEUU - Muenster, Alemania
Sitekiosk.es - Grupo24®, Madrid, España -