Trying to set the radwindow to a percent of the screen size. This way the user still knows its a pop-up window and has to be closed apporpriately instead of thinking its a real window, found an example online but it does not work, so I though Telerik has done this somewhere, so here I am asking the question.
Here is what I have but nothing works. I need to set it at about 90% of the screen size.
function SelectedName(source, eventArgs) {
var txt = eventArgs.get_text();
var val = eventArgs.get_value();
var radWidow = $find("<%= RadWindow.ClientID%>");
var textbox = document.getElementById("<%=txtSearch.ClientID%>");
if (val == '') {
alert('You must pick a recruit from drop down list.');
}
else {
radWidow.show();
radWidow.setUrl("ManageProcessor.aspx?Pass=" + val);
var browserWidth = $telerik.$(window).width();
var browserHeight = $telerik.$(window).height();
radWidow.setSize(Math.ceil(browserWidth * value / 100), Math.ceil(browserHeight * value / 100));
radWidow.center();
textbox.value = '';
}
}
function VerifyEnlist() {
var Enlist = document.getElementById("<%=ddlEnlistment.ClientID%>").value;
var radWidow = $find("<%= RadWindow.ClientID%>");
if (Enlist == 4) {
radWidow.show();
radWidow.setUrl("WoTracker.aspx");
var browserWidth = $telerik.$(window).width();
var browserHeight = $telerik.$(window).height();
radWidow.setSize(Math.ceil(browserWidth * value / 100), Math.ceil(browserHeight * value / 100));
radWidow.center();
}
else {
radWidow.show();
radWidow.setUrl("ManageProcessor.aspx?Type=" + Enlist);
var browserWidth = $telerik.$(window).width();
var browserHeight = $telerik.$(window).height();
radWidow.setSize(Math.ceil(browserWidth * value / 100), Math.ceil(browserHeight * value / 100));
radWidow.center();
}
}