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

Issues with opening in the center of window in ie-7-8-9

1 Answer 116 Views
Window
This is a migrated thread and some comments may be shown as answers.
Varsha
Top achievements
Rank 1
Varsha asked on 23 Mar 2012, 08:10 AM
I'm trying to get my window to open in the center of the screen.
I'm here totally confuse with the code.

It is working fine in brwosers like FF & Chrome.
here is the code m using:

$(document).ready(function() {
                    var window = $("#window"),
                    undo = $("#undo")
                            .bind("click", function() {
                                window.data("kendoWindow").open();
                                undo.show();
                            });
                    
                    var onClose = function() {
                    undo.show();
                    }
                    
                    if (!window.data("kendoWindow")) {
                    window.kendoWindow({
                        width: "500px",
height: "330px",
                        modal: true,
                        title: "RFX Details",
visible: false,
                        content: "popupContent.html",
                        actions: ["Refresh", "Maximize", "Close"],
close: onClose
                    }).data("kendoWidnow").center().open();
                    


}
$("#undo").click(function(){
var window = $("#window").data("kendoWindow");
window.center();
window.open();
});
                    });

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 23 Mar 2012, 03:54 PM
Hi Varsha,

There are spelling and programming mistakes in the provided code. Please fix them and try again.


<button id="undo">undo button</button>
<div id="window"></div>


var win = $("#window"),
    undo = $("#undo"),
    onClose = function() {
        undo.show();
    };
 
win.kendoWindow({
    width: "500px",
    height: "330px",
    modal: true,
    title: "RFX Details",
    visible: false,
    content: ".....",
    actions: ["Refresh", "Maximize", "Close"],
    close: onClose
}).data("kendoWindow").center().open();
 
undo.click(function() {
    var winObj = $("#window").data("kendoWindow");
    winObj.center().open();
});


Regards,
Dimo
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
Varsha
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or