This question is locked. New answers and comments are not allowed.
Hi Everybody,
I am using telerik window to replace the standard javascript alert and confirm boxes, I open the window from a javascript using the client API here is the code I use:
function confirmSubmit(message) {
if (!dialog) {
dialog = $.telerik.window.create({
title: "Title",
html: message,
modal: true,
resizable: false,
draggable: false,
visible: false
})
.data('tWindow');
}
$('div.telerikWindowMessage').empty().append(message);
dialog.center().open();
}
and it works just fine for me, but if the user scrolls all the way down to the page and perform something that open the window, then the window get open at the page center, and you cannot see it unless you scroll up. Is there any way that I can center it relative to the window rather than the page. Thank you in advance.
Abiy,
I am using telerik window to replace the standard javascript alert and confirm boxes, I open the window from a javascript using the client API here is the code I use:
function confirmSubmit(message) {
if (!dialog) {
dialog = $.telerik.window.create({
title: "Title",
html: message,
modal: true,
resizable: false,
draggable: false,
visible: false
})
.data('tWindow');
}
$('div.telerikWindowMessage').empty().append(message);
dialog.center().open();
}
and it works just fine for me, but if the user scrolls all the way down to the page and perform something that open the window, then the window get open at the page center, and you cannot see it unless you scroll up. Is there any way that I can center it relative to the window rather than the page. Thank you in advance.
Abiy,
7 Answers, 1 is accepted
0
Hi Abiy,
Atanas Korchev
the Telerik team
We fixed a similar problem in the service pack. You can try upgrading to this version.
Regards,Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Abiy
Top achievements
Rank 1
answered on 13 Oct 2010, 04:15 PM
Hi Atanas,
I replaced my telerik window js file with the new service pack file but it does not help, I want the window to get displayed at the center of visitors view port instead of the page. Does it depend on anyother js file rather than telerik.window.min.js?
Thanks,
Abiy
I replaced my telerik window js file with the new service pack file but it does not help, I want the window to get displayed at the center of visitors view port instead of the page. Does it depend on anyother js file rather than telerik.window.min.js?
Thanks,
Abiy
0
Hi Abiy,
Please find attached a sample project that demonstrates the fix. It uses the latest internal build (but the issue should be fixed in the service pack, too). Does it differ from your setup?
Greetings,
Alex Gyoshev
the Telerik team
Please find attached a sample project that demonstrates the fix. It uses the latest internal build (but the issue should be fixed in the service pack, too). Does it differ from your setup?
Greetings,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
murali
Top achievements
Rank 1
answered on 10 Nov 2010, 11:13 PM
Hello Everyone, I am having a similar question, how do I position the window relative to a text box,
like I have a search box, want to open the results in a window right below the text box when the window opens for the first time
and from then on maintain its default behavior, like if the user moves the window to a different position and closes the search results open the window in the last known position.
If I don't specify anything the window opens on the top left corner of the browser, how do I change this behavior.
Thank you,
mk
like I have a search box, want to open the results in a window right below the text box when the window opens for the first time
and from then on maintain its default behavior, like if the user moves the window to a different position and closes the search results open the window in the last known position.
If I don't specify anything the window opens on the top left corner of the browser, how do I change this behavior.
Thank you,
mk
0
Hi Murali,
You should set the desired window coordinates before opening it.
var searchBox = $('#searchBox'),
searchBoxOffset = searchBox.offset();
$('.t-window').css({
left: searchBoxOffset.left,
top: searchBoxOffset.top + searchBox.height()
}).data('tWindow').open();
Kind regards,
Alex Gyoshev
the Telerik team
You should set the desired window coordinates before opening it.
var searchBox = $('#searchBox'),
searchBoxOffset = searchBox.offset();
$('.t-window').css({
left: searchBoxOffset.left,
top: searchBoxOffset.top + searchBox.height()
}).data('tWindow').open();
Kind regards,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
murali
Top achievements
Rank 1
answered on 12 Nov 2010, 03:25 PM
Cool, Thanks Alex, that did the trick.
mm
mm
0
Varsha
Top achievements
Rank 1
answered on 19 Mar 2012, 09:02 AM
Hi Alex,
I m facing the issue in ie7-8-9 - that is window does not get centered of the page.
Also window ajax content does not appear when i open it in chrome browser.
suggest a solution pls.
I m facing the issue in ie7-8-9 - that is window does not get centered of the page.
Also window ajax content does not appear when i open it in chrome browser.
suggest a solution pls.