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

how to open popup window several times, each time with a different URL?

3 Answers 173 Views
Window
This is a migrated thread and some comments may be shown as answers.
Tim R
Top achievements
Rank 1
Tim R asked on 18 Feb 2013, 03:32 PM
I think my understanding of the kendo window's refresh() method may be incorrect. If it is, could you please explain  what refresh() does, and advise on how to accomplish the desired behavior?  

Main page has department employees listed on it.  When an employee name is clicked, a popup window opens, showing the employee's calendar. Then the popup can be closed by the user, and another employee's name can be clicked, and their calendar should be displayed. And so on and so on.  The calendar must change when currentEmployeeID changes. 

My code below isn't working as I expected: the calendar does not change, even though on the second and subsequent times, refresh() is being invoked with a different URL.

currentEmployeeID =  //user  makes a selection and employeeName is also changed accordingly
  if (!mydiv.data("kendoWindow") ) {
       mydiv.kendoWindow({
                iframe: true,                   
                title:  employeeName,
                content: "calendar.htm?eeid="+currentEmployeeID;         
                type: "GET"
                }
         });
       mydiv.data("kendoWindow").open();
 
} else {
       mydiv.data("kendoWindow").refresh({
            iframe: true,
            type: "GET",
            title:  employeeName,        
            url:  "calendar.htm?eeid="+currentEmployeeID       
        });
         mydiv.data("kendoWindow").open();
}



3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 20 Feb 2013, 09:19 AM
Hi Tim,

 
Basically the current approach is valid, however I tried to reproduce the problem locally but to no avail – the window contents is reloading correctly on our side. Could you please provide runable project where the issue is reproduced? 

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Tim R
Top achievements
Rank 1
answered on 20 Feb 2013, 01:16 PM
My problem might be with the configuration object passed to the refresh( {options } ) method.  Which window options/properties can be set via refresh()?  The documentation is somewhat unclear regarding when to use setOptions versus refresh( {options... }).
0
Vladimir Iliev
Telerik team
answered on 22 Feb 2013, 11:46 AM
Hi Tim,

 
Basically the setOptions method allows the window widget to be configured again (all options are available). Also the current configuration looks valid and it's working on our side. Could you please check if there are any JavaScript errors in your browser console?

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Window
Asked by
Tim R
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Tim R
Top achievements
Rank 1
Share this question
or