<a href="javascript:getAllData();">get all data</a>
<a href="javascript:setAllData();">set 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 setAllData()
{
smartcard.CustomerData.SetData(0, "New name");
smartcard.CustomerData.SetData(1, "New email address");
smartcard.CustomerData.SetData(2, "New POP server");
smartcard.CustomerData.SetData(3, "New POP password");
smartcard.CustomerData.SetData(4, "New free data");
smartcard.CustomerData.SetData(5, "New startpage");
smartcard.CustomerData.SetData(6, "New currency");
}
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>
|