or
<!DOCTYPE html><html><head> <title>Test</title> <link href="styles/kendo.common.min.css" rel="stylesheet" /> <link href="styles/kendo.default.min.css" rel="stylesheet" /> <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" /> <link href="styles/index.css" rel="stylesheet" /></head><body onload="onBodyLoad()" style="height:100%; padding-bottom: 100%"> <div data-role="view" id="test"> <a href="#test" class="button" data-role="button" data-click="test.myAlert" data-att="attributeTest" data-icon="search">buttonTest</a> </div> <script src="lib/jquery.min.js"></script> <script src="lib/kendo.all.min.js"></script> <script src="init/cordovaInit.js"></script><script type="text/javascript"> var Test = kendo.Class.extend({ init: function() { } myAlert: function(e) { alert("test"); }});</script> <script> var app = new kendo.mobile.Application($(document.body), { skin: "flat" }); var test = new Test(); test.myAlert(); </script> </body> </html>Uncaught SyntaxError: Unexpected identifier index.html:24Uncaught ReferenceError: Test is not defined index.html:32Uncaught TypeError: Cannot read property 'myAlert' of undefined$(document).ready(function() {var transactionModel = kendo.data.Model.define({ fields: { id: "transact", persons: { editable: false }, time: { editable: false, type: "date", }, transact: { editable: false }, amount: { editable: false, type: "number", }, }});var dataSource = new kendo.data.DataSource({transport : {read : "/wwwdocs/ajax.php", schema : {data : transactionModel},},});$(function() {$("#transactions").kendoGrid({dataSource : dataSource,columns : [ {field : "persons",title : "Navn",width : 300}, {field : "time",title : "Tid",width : 160,}, {field : "transact",title : "Transaksjons-id",width : 160}, {field : "amount",title : "Sum",width : 160}, ],filterable : true,sortable : true,groupable: true,});});});<div data-role="view" id="home-view" data-layout="default" data-title="Hello World!" data-init="app.views.home.init" data-before-show="app.views.home.beforeShow" data-show="app.views.home.show" data-model="app.views.home.viewModel"> <ul data-role="listview" data-bind="source: navigation" data-template="navigation-template"></ul></div><script id="navigation-template" type="text/x-kendo-template"> <li> <a href="#: url #">#: linkText #</a> </li></script>define(["kendo"], function (kendo) { return { init: function (initEvt) { }, beforeShow: function (beforeshowEvt) { }, show: function (showEvt) { }, viewModel: kendo.observable({ navigation: [ { linkText: 'My Data', url: 'myData' }, { linkText: 'My Purchase Requests', url: 'myPurchaseRequests' }, { linkText: 'My Purchase Orders', url: 'myPurchaseOrders' }, { linkText: 'Pending PR Tasks', url: 'pendingPrTasks' }, { linkText: 'Pending PO Tasks', url: 'pendingPoTasks' } ] }) }});001.$(document).ready(function() {002. var $grid = $("#samples-all").kendoGrid({003. dataSource: {004. transport: {005. read: "/uploads/",006. dataType: "json",007. create: {008. /* don't cache grid items, otherwise miss new uploads */009. cache: false010. }011. },012. schema: {013. data: "rows",014. total: "totalRows"015. },016. pageSize: 20,017. serverPaging: true,018. serverFiltering: true019. },020. pageable: true,021. scrollable: false,022. filterable: {023. extra: false,024. operators: {025. string: {026. eq: "Is equal to",027. neq: "Is not equal to"028. }029. }030. },031. columns: [032. {033. field: "threat_presence",034. title: " ",035. template: kendo.template($("#tp-template").html(), { useWithBlock: false }),036. width: 29,037. filterable: {038. ui: threatFilter039. }040. },041. {042. field: "file_name",043. title: "Name",044. template: kendo.template($("#file-name-template").html(), { useWithBlock: false }),045. width: 250,046. filterable: false047. },048. {049. field: "file_type",050. title: "Type",051. filterable: false052. },053. {054. field: "file_count",055. title: "File Count",056. width: 55,057. filterable: false058. },059. {060. field: "sha1",061. title: "SHA1",062. width: 250,063. filterable: false064. },065. {066. field: "message",067. title: "Status",068. width: 70,069. filterable: false070. },071. {072. field: "inserted",073. title: "First Seen",074. filterable: false075. },076. { command: { text: "Download", click: download }, title: " ", width: "85px" }077. ]078. }).data("kendoGrid");079. // setup the upload window and toolbar button080. var $uploadWindow = $("#uploadWindow"),081. $btnUpload = $("#btnUpload").on("click", function() {082. $uploadWindow.data("kendoWindow").open();083. });084. 085. if (!$uploadWindow.data("kendoWindow")) {086. $uploadWindow.kendoWindow({087. width: "400px",088. title: "Upload",089. visible: false090. });091. }092. $("#upload-file").kendoUpload({093. async: {094. saveUrl: "/upload-samples/",095. removeUrl: "remove",096. autoUpload: false097. },098. upload: onUpload,099. success: onUploadSuccess,100. complete: onUploadComplete101. });102. 103. function onUpload(e) {104. // omitted105. }106. function onUploadSuccess(e) {107. // omitted108. }109. function onUploadComplete(e) {110. console.log(e);111. var grid = $("#samples-all").data("kendoGrid");112. grid.dataSource.read();113. grid.refresh();114. }115.});<div id="samples-list-container"> <div id="samples-all"></div></div>