GetData Method



 
The GetData method reads user information from the SmartCard.


Syntax

    [long=] SiteKiosk.Plugins("SiteCash").Devices("ACOS").CustomerData.
          GetData(function, index)
    
Parameters
    function String that specifies a callback function with parameters.
    index Long value that specifies the value to read from the card.
Return Value
    Returns a Long value containing the ID of the read request.
Remarks
    The values that can be saved to the SmartCard are referenced through the numbers 0 to 6:

    0: Name
    1: eMail address
    2: POP server
    3: POP password
    4: Free data
    5: Start page
    6: Currency
Examples
    The following example shows all user information saved to the SmartCard.

    <a href="javascript:getAllData();">get all data</a>
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    smartcard = SiteKiosk.Plugins("SiteCash").Devices("ACOS");
    function getAllData()
    {
       smartcard.CustomerData.GetData(NameReady, 0);
       smartcard.CustomerData.GetData(EmailAddressReady, 1);
       smartcard.CustomerData.GetData(POPServerReady, 2);
       smartcard.CustomerData.GetData(POPPasswordReady, 3);
       smartcard.CustomerData.GetData(FreeDataReady, 4);
       smartcard.CustomerData.GetData(StartpageReady, 5);
       smartcard.CustomerData.GetData(CurrencyReady, 6);
    }
    function NameReady(id, index, data)
    {
       alert("Name: " + data);
    }
    function EmailAddressReady(id, index, data)
    {
       alert("Email address: " + data);
    }
    function POPServerReady(id, index, data)
    {
       alert("POP server: " + data);
    }
    function POPPasswordReady(id, index, data)
    {
       alert("POP password: " + data);
    }
    function FreeDataReady(id, index, data)
    {
       alert("Free data: " + data);
    }
    function StartpageReady(id, index, data)
    {
       alert("Startpage: " + data);
    }
    function CurrencyReady(id, index, data)
    {
       alert("Currency: " + data);
    }
    </SCRIPT>
    

Applies to
    SiteKiosk v5.0 (and later versions).

Back to top