Window shows url as text

2 posts, 1 answers
  1. Christopher
    Christopher avatar
    9 posts
    Member since:
    Apr 2013

    Posted 06 Aug 2015 Link to this post

    Hey guys,

    i am trying to set the url of a window, but everytime the url is shown as text instead if the content from url. Any hints for me? 

    e.preventDefault();
    var dataItem = this.dataItem($(e.currentTarget).closest(\"tr\"));
    var wnd = $("#window").data("kendoWindow");
    wnd.content("./window.php?id=" + dataItem.ID);
    wnd.open().center().toFront();

    Window is created by php...

    $window = new \Kendo\UI\Window('window');
    $window->title('Object Details')
         ->visible(false)
         ->modal(true)
         ->content(array("url" => "./window.php"))
         ->resizable(true)
         ->width(300)
         ->height(300);
    echo $window->render();

     

    Regards

    Chris    

  2. Answer
    Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 06 Aug 2015 Link to this post

    Hello Chris,

    The content() method applies string content only.

    http://docs.telerik.com/kendo-ui/api/javascript/ui/window#methods-content

    The refresh() method should be used to load new content via Ajax.

    http://docs.telerik.com/kendo-ui/api/javascript/ui/window#methods-refresh

    On a side note, there is no need to manually call toFront() when opening a Window, because the widget does that automatically.

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
Back to Top