Kendo UI View Events not triggered when used in Layout

2 posts, 0 answers
  1. Matthias
    Matthias avatar
    1 posts
    Member since:
    Mar 2015

    Posted 09 Apr 2015 Link to this post

    <div id="wms-app"></div>
      var router, layout;
        var loginView = new kendo.View("view-login", { show: function(e){
                                                            $('input').keypress(function(event) {
                                                                if(event.which == 10 || event.which == 13) {
                                                                    window.location = document.getElementById('textButton').href;
                                                       }, wrap: false });  
        // setup layout
        layout = new kendo.Layout("layout-template1", { show: function(e){
                                                            var pN = document.getElementById("wms-content").parentNode;
                                                   = "height:100%";
                                                        } });
        // define a default view
        layout.showIn("#wms-content", loginView);
        // define a router with a basic routes
        router = new kendo.Router();
    <script id="view-login" type="text/x-kendo-template">
        <div id="loginBox">
            <div id="login-header">
            <input id='inputuser' class="k-textbox one-edge-shadow" placeholder="Username"></input>
            <input id='inputpasswd' type="password" class="k-textbox one-edge-shadow" placeholder="Password"></input>
            <a id="textButton" class="k-button one-edge-shadow" href="#/main">LOGIN</a>
    <script id="layout-template1" type="text/x-kendo-template">
        <div id="wms-content"></div>


     The alert for the layout gets triggerd but the alert for the view not! why??


    Thank you

  2. Petyo
    Petyo avatar
    2437 posts

    Posted 10 Apr 2015 Link to this post


    your script generates a javascript error (missing parentNode), which terminates the rest of the script execution, including the view alert. 

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