Hi All
I installed Build 8000-5628 on the 2nd January and I am having problems that it won't execute javascript that has been working for the last 5 years
Two examples are below, I have recalculated all the controls on my UX taken sanitize off with no success I have loaded backups of the UX but still no joy.
Does anybody have any ideas of what I might try?
Andy
I installed Build 8000-5628 on the 2nd January and I am having problems that it won't execute javascript that has been working for the last 5 years
Two examples are below, I have recalculated all the controls on my UX taken sanitize off with no success I have loaded backups of the UX but still no joy.
Does anybody have any ideas of what I might try?
Andy
Code:
{dialog.Object}.setValue('Pay_Type','Cash'); var _ok = function() { {dialog.object}.runAction('PayOnLine'); }; var _err = function() { THE FUNCTION IS ALWAYS ENDING UP HERE AND ALERTING THAT IT DID NOT RESPOND alert('server did not respond'); {dialog.object}.runAction('PayOffLine'); }; //wait up to 2000 milliseconds before calling either the _ok or _err callback function {dialog.object}.serverIsAvailable(2000,_ok,_err);
Code:
data = lObj._rData; var html = '', sttl = 0; for (var i = 0; i < data.length; i++) { html += '<LEFT><SMALL> ' + data[i].PRICE +' ' + data[i].NAME + '<br>' sttl += +data[i].PRICE; }; var _d = {"name": vStore,"Add1": vAdd1,"Add2": vAdd2,"City": vCity,"Pcode": vPostCode,"vat": vVAT,"paid": vTen,"Change": vChange,"Subtotal": vSub}; var _h = '<center><BIG>' + _d.name + '<br>'; _h += '<center><Small>' + _d.Add1 + '<br>'; _h += '<center><Small>' + _d.Add2 + '<br>'; _h += '<center><Small>' + _d.City + '<br>'; _h += '<center><Small>' + _d.Pcode + '<br><br>'; //footer part var _f = '<BOLD><SMALL><LEFT>Sub Total VAT Total<br>'; _f += '<BOLD><SMALL><LEFT>' + _d.Subtotal + ' ' + _d.vat + ' ' + vTot + '<br>'; _f += 'Paid: ' + _d.paid + '<br>'; _f += 'Discount:' + vS_Dic + '<br>'; _f += 'Change: ' + vChange + '<br>'; 1 var dt = new Date().toDateString(); _f += 'Date: '+ dt + '<br>'; _f += 'Order: '+ vOrder + '<br>'; _f += 'Payment: '+ vpayment + '<br>'; _f += 'Discount:'+ vApplyDisc + '<br>'; //_f += 'Date: ' + dt.toFormat('dd/mm/yyyy') + '<br>'; _f += '<LINE><SMALL><LEFT>Thank you for your purchase. Please retain for your records. '; _f += '<SMALL><LEFT> Please ensure you use the correct charging equipment for your device, mobile phone and tablet chargers can be dangerous.'; _f += '<br><CUT><DRAWER>'; //put it all together var vReceipt = '<LOGO2>' + _h + html +'<br>' + _f //alert(vReceipt); CODE FAILS HERE var sApp = startApp.set({ "action":"ACTION_SEND", "type":"text/plain", "component": ["pe.diegoveloper.printing"], }, {"EXTRA_TEXT":vReceipt /*dataToPrint*/ }); sApp.start(function() { /* success */ console.log("PRINT OK"); }, function(error) { /* fail */ alert(error); });
Comment