Onerror Event - Epson TM-T88V-i User Manual

Epos-print api
Hide thumbs Also See for TM-T88V-i:
Table of Contents

Advertisement

onerror event

This property registers the callback function and obtains a communication error event.
Syntax
Function (error)
Parameter of the callback function
Parameter:
Name:
Object type:
Properties of the error object
property
status
responseText
Example
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>
192
error (See "Properties of the error object" on page 192.)
Communication error information
Object
Name
HTTP status
Responce text
Object type
Number
String

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tm-t70-iTm-l90-i

Table of Contents