This question is locked. New answers and comments are not allowed.
I have a modalview with two data-bind buttons, "click: enter" and "click: close". I also have a textbox data-bind "value: BtscannedCust".
In my js file:
window.BTscanView = kendo.observable({
enter: function () {
var that = this;
customerScanDataSource.add({ scanned: this.BtscannedCust });
customerScanDataSource.one("sync");
customerScanDataSource.sync();
document.getElementById("BtscannedCust").value = "";
var text_input = document.getElementById("BtscannedCust");
text_input.focus();
text_input.select();
console.info("Test");
},
close: function () {
$("#Btscan").data("kendoMobileModalView").close();
this.BtscannedCust = "";
}
});
I need to detect a 'Enter" keypress in the textbox and then fire the "enter: function".
In my js file:
window.BTscanView = kendo.observable({
enter: function () {
var that = this;
customerScanDataSource.add({ scanned: this.BtscannedCust });
customerScanDataSource.one("sync");
customerScanDataSource.sync();
document.getElementById("BtscannedCust").value = "";
var text_input = document.getElementById("BtscannedCust");
text_input.focus();
text_input.select();
console.info("Test");
},
close: function () {
$("#Btscan").data("kendoMobileModalView").close();
this.BtscannedCust = "";
}
});
I need to detect a 'Enter" keypress in the textbox and then fire the "enter: function".