192
onerror event
This property registers the callback function and obtains a communication error event.
Syntax
Function (error)
Parameter of the callback function
Parameter:
error
)
Name:
Communication
error
information
Object
type:
Object
Properties of the error object
Example
property
Name
Object type
status
HTTP status
Number
responseText
Responce text
String
To print Canvas(ID=myCanvas):
To display the HTTP status code in a message box when a communication error occurs.
<script type="text/javascript" src="epos-print-3.x.x.js"></script>
<script type="text/javascript">
<!--
function printCanvas() {
var address = 'http://192.168.192.168/cgi-bin/epos/service.cgi?devid=local_printer';
var canvas = document.getElementById('myCanvas');
var epos = new epson.CanvasPrint(address);
epos.onerror = function (err) {
var status = err.status;
var text = err.responseText;
alert(status);
};
epos.print(canvas);
}
//-->
</script>
Summary of Contents for TM-T88V-i
Page 10: ...10 ...
Page 14: ...14 ePOS Print Canvas API Monochrome or Grayscale Monochrome ...
Page 160: ...160 ...
Page 258: ...258 ...