Window won't open after calling "load" on an unrelated div.

2 posts, 1 answers
  1. Answer
    Javier avatar
    20 posts
    Member since:
    Dec 2013

    Posted 10 Dec 2013 Link to this post

    I have a window on my page:

        .Title("Add New Comment").LoadContentFrom("AddComment", "Comparisons", new { startDate = @ViewBag.startDate, endDate = @ViewBag.endDate })

        .Position(settings => settings.Top(100).Left(100)).Visible(false).Modal(true).Iframe(true)
        .Actions(actions => actions.Close())

    I open the window with a hyperlink, here is the binding:

            $("#addCommentLink").click(function () {

    I have a div that's not related at all to the window.

    <div id='dummy'></div>

    At some point I load the div with a partial render.

    function ReloadCommentSection() {      
            $("#dummy").load('@Url.Action("CommentEventSection", new { startDate = @ViewBag.startDate, endDate = @ViewBag.endDate })');        

    Once that div is loaded, the window won't open any more.  I get an error that  $("#window").data("kendoWindow") is undefined.

    What am I doing wrong?
  2. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 12 Dec 2013 Link to this post

    Hello Buddy,

    I assume the partial view that you are loading again contains scripts such as jQuery. Check the troubleshooting guide:

    Petur Subev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
Back to Top