This is a migrated thread and some comments may be shown as answers.

Window shows url as text

1 Answer 9 Views
Window
This is a migrated thread and some comments may be shown as answers.
Christopher
Top achievements
Rank 1
Christopher asked on 06 Aug 2015, 11:11 AM

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    

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 06 Aug 2015, 01:19 PM
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!
Tags
Window
Asked by
Christopher
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or