Kendo Window Value passing

HTML

<script src="http://cdn.kendostatic.com/2012.1.229/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.229/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2011.3.1129/styles/kendo.default.min.css">
<script src="Firebug :https://getfirebug.com/firebug-lite-debug.js"></script>
<div id="window">
 </div>

<span id="undo" class="k-button">Click here to open the window.</span>
<script id="scriptTemplate" type="text/x-kendo-template">
    Hello, #= firstName # #= lastName #
</script>

JavaScript

$(document).ready(function() {
                    var window = $("#window"),
                        undo = $("#undo")
                                .bind("click", function() {
                                    window.data("kendoWindow").open();
                                    undo.hide();
                                });
  
                    var onClose = function() {
                        undo.show();
                    }

                    if (!window.data("kendoWindow")) {
                        window.kendoWindow({
                            width: "600px",
                            actions: ["Custom", "Minimize", "Maximize", "Close"],
                            title: "Test",
                            visible: false,
                            close: onClose
                        });
                    }
                  
                  var scriptTemplate = kendo.template($("#scriptTemplate").html());
                  var scriptData = { firstName: "John", lastName: "Doe" };
                  $("#window").html(scriptTemplate(scriptData));

                });