Section 3. events – MagTek BLUETOOTH SWIPE READER User Manual
Page 25
19
SECTION 3. EVENTS
1) On a card data change event:
In the event of card data change, the applet will return the card-swipe data by calling the Java script provided in
the para name of RunJSOnCardDataChange. The Java script to be called must have one parameter to receive
the card-swipe data. For example, the applet will return the card-swipe data by calling the “SetCardData” Java
script in the following example. The “SetCardData” function prototype is as follows:
function SetCardData(cardSwipedData)
{ //Do something on a card data change event. }
<
script
language
="JavaScript">
if
(window.navigator.appName.toLowerCase().indexOf(
"netscape"
)!=-1)
{
// set object for Netscape:
document.getElementById(
'dvObjectHolder'
).innerHTML =
""
;
}
else
if
(window.navigator.appName.toLowerCase().indexOf(
'internet
Explorer'
)!=-1){
//set object for IE
document.getElementById(
'dvObjectHolder'
).innerHTML =
""
}
script
>
2)
If the param name “
ReportJavaPluginVersion” is set to “yes”, the Java script
“
ReportJavaPluginVersion
” should be available to be called and will have
the following function prototype:
function
ReportJavaPluginVersion(ver) {//Do something }