Uncaught TypeError: Cannot read property 'replace' of undefined

2 posts, 0 answers
  1. Adeeb
    Adeeb avatar
    2 posts
    Member since:
    Oct 2014

    Posted 12 Dec 2014 Link to this post

    I keep getting this error. The template names matches. Can you please look intog this


     Please select factories from available factories list:

    <tr><th>Available factories</th><th>         </th><th>Selected factories</th></tr><th>         </th>
    <td><div id="listA"></div></td>
    <td><button id='right'> Add</button></td>

    <script id="listBTemplate" type="text/x-kendo-template">

    # if (packout === false){#
    <div class='item'> #: name #  
    <label class='chkbox'> <input  id=#=uid#  type='checkbox' onClick='packout(this.id)'> 
    # }else if(packout === true) { #
    <div class='item'> #: name #  
    <label class='chkbox'> <input  id=#=uid#  type='checkbox' onClick='packout(this.id)'  checked>

    <div id="listB"></div>

    <td><button id='left'>Remove</button></td>
    <td><button id="saveButton">Save</button></td>
    <td><button id="cancelButton">Close</button></td>

        #listA, #listB {
    width: 400px;
            height: 600px;
    overflow: auto;
            float: left;
            margin-right: 30px;
            border: 3px solid black;
            border-radius: 3px;

        .item {
            margin: 5px;
            padding: 5px;
            text-align: left;
            border: 2px solid #ccc;
            border-radius: 5px;
    //Javascript snippet causing the issue:
      var _listB = $("#listB").kendoListView({
            dataSource: [],//listB_DS
    template: kendo.template($("#listBTemplate").html()),
    selectable: "multiple"
  2. Petyo
    Petyo avatar
    2444 posts

    Posted 13 Dec 2014 Link to this post

    Hello Adeeb,

    I tried to reproduce the issue based on your code, and it does not result in the error you describe. Perhaps I am missing something?

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top