I'm trying to open a window where content page has uses a template to display the data.
The content page it self works fine just entering the url but when I try to open it as a window nothing happens.
//content page
The content page it self works fine just entering the url but when I try to open it as a window nothing happens.
var window = $("#window");
window.kendoWindow({
width: "505px",
height: "315px",
title: "Mail",
actions: ["Refresh", "Maximize", "Close"],
content:"inbox/getemail.aspx?msgid="+msgid,
iframe:false
});
window.data("kendoWindow").open();
//content page
script language="javascript">
var messageData;
$.fn.getMessageData = function(){
messageData =
{
time:'2012-07-26 12:34:50',
sender:'test@test.com',
subject:'Testing message data'
};
};
$(function(){
var template = kendo.template($("#template").html());
$.fn.getMessageData();
$("#preview").html(template(messageData));
});
</
script
>
<
script
type
=
"text/x-kendo-template"
id
=
"template"
>
<
h3
>#= subject #</
h3
>
<
h4
>posted on #= time # by <
strong
>#= sender #</
strong
></
h4
>
</
script
>
<
div
id
=
"preview"
></
div
>