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

Open kendo window in new browser window/tab

3 Answers 239 Views
Window
This is a migrated thread and some comments may be shown as answers.
syian
Top achievements
Rank 1
Veteran
syian asked on 22 Apr 2020, 10:30 AM
I have a button on a tabstrip which onclick clones the active tab in a new kendoWindow. The problem is, that I need a new browser window, not a Kendo one.
I tried the following:
...                           
var clonedwin = jq(tab).clone().kendoWindow({ 
   title:     title,
   actions:   ["Close"],
   modal:     false,
   width:     "50%",
   height:    "600px",
   visible:   true,
   draggable: true,
   resizable: false,
   position: {
    top:  "10%",
    left: "30%"
   }                               
}).data("kendoWindow");
 
var win = window.open(clonedwin,"_blank","left=200,top=235,width=815,height=470,scrollbars=auto");

...

 

The result is a new window with the error: "Unable to find web object file '[object Object]'" plus a new KendoWindow with the content from the tab.

Thank you in advance, 
Syian


3 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 24 Apr 2020, 05:59 AM

Hi Syian,

I have implemented the following Dojo sample, based on a suggestion form a StackOverflow thread:

https://stackoverflow.com/a/19078591

Note that you will need to pass the new Window content as an HTML string to the innerHTML property of its body:

win.document.body.innerHTML = tab;

As you need to open a new browser window, you won't need to initialize the Kendo Window itself at all.

Regards,
Veselin Tsvetanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
syian
Top achievements
Rank 1
Veteran
answered on 24 Apr 2020, 10:41 AM

Hi Veselin, 

thanks for the response. 

What you described is how in general the window.open works, which I already included in my original post. I was maybe not clear enough.. The goal is to create a new browser window and to load the Kendo element from the screen I am currently in.
It comes down to if it is possible to pass a Kendo element - in this case the cloned kendoWindow - as an HTML string. 

I tried the way you described:

var win = window.open("","_blank","left=200,top=235,width=815,height=470,scrollbars=auto");

win.document.body.innerHTML = clonedwin;

which gives me the attached screen that shows [object Object].

Regards, 
Syian

0
Veselin Tsvetanov
Telerik team
answered on 28 Apr 2020, 09:37 AM

Hello Syian,

I am afraid that is is not possible to move a Kendo widget from one browser window to another. Hence, the result observed is expected.

Regards,
Veselin Tsvetanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Window
Asked by
syian
Top achievements
Rank 1
Veteran
Answers by
Veselin Tsvetanov
Telerik team
syian
Top achievements
Rank 1
Veteran
Share this question
or