Hi Telerik support team;
We have a web page which is opening a modal radwindow. This radwindow loads another aspx page. In the modal popup, a search is done and the search results are shown in a radgrid. When a row is clicked on the radgrid, then the window closes and passes values back to the calling page and populates a text box.
The problem is that on the popup, if the search returns about 5000+ rows, and if one of the rows is clicked, then window closes but causes a javascript endless loop which in IE produces a dialog that says "Stop running this script? A script on this page is causing your web browser to run slowly. If it continues to run, your computer might become unresponsive." Could you please suggest a fix for this? I have attached the javascript code on the calling page and the lookup page loaded in the radwindow. Thanks in advance,
Meera
Calling Page:
Js code:
function openRadWindow(windowname) {
var accPage = '<%=Page.ResolveUrl("LookUpProducts.aspx") %>';
var txthiddenproduct = document.getElementById("<%= hiddenProductName.ClientID %>");
txthiddenproduct.value =
"";
var oWnd = radopen(accPage, "Product Lookup");
oWnd.add_close(clientClose);
oWnd.setSize(920, 600);
oWnd.set_modal(
true);
oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Resize + Telerik.Web.UI.WindowBehaviors.Maximize)
var y = document.documentElement.scrollTop;
var x = document.documentElement.scrollLeft;
oWnd.moveTo(x + 50, y + 50);
}
function
clientClose(sender, eventArgs) {
var arg = sender.argument;
sender.SetUrl(
"about:blank");
var products = document.getElementById("<%= acProductNames.ClientID %>");
var txthiddenproduct = document.getElementById("<%= hiddenProductName.ClientID %>");
if (arg) {
if (txthiddenproduct.value == "") {
products.value = arg;
txthiddenproduct.value = arg;
}
}
}
Popup page within radwindow:
Javascript code:
function RowSelected(sender, args) {
var productname = args.getDataKeyValue("ProductName");
if (productname === null || productname === "") {
productname =
"NoValue";
}
var returnvalue = args.getDataKeyValue("ProductName");
returnArg(returnvalue);
}
var oWnd;
function pageLoad() {
oWnd = GetRadWindow();
}
function returnArg(value) {
oWnd = GetRadWindow();
oWnd.argument = value;
// Set the updated value in button click
oWnd.close();
}
function GetRadWindow() {
var oWindow = null;
if (window.radWindow)
oWindow = window.radWindow;
else if (window.frameElement.radWindow)
oWindow = window.frameElement.radWindow;
return oWindow;
}