5 Answers, 1 is accepted
Hello Dan,
Could you explain what the exact problem is?
In the meantime, I suggest you review the following article to see how to get references to the RadWindow in different scenarios, because $find() is not always the correct approach and may cause errors: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/client-side-programming/overview.
In the meantime you may find the follwing resources interesting in case they are similar to your problem:
Regards,
Marin BratanovTelerik by Progress
I found that the error javascript error was occuring the in windows ide. but I have a more insidious problem with window ... it won't close. it doesn't throw an error, just won't close. I am sending a zip file with both the parent and child aspx files for your inspection. perhaps you'll see the error of my ways!
btw, it's a zip file. remove the .png extension
Hello Dan,
It is a bit unclear what is the exact hierarchy and which page is opened in the RadWindow.
Nevertheless, what I can suggest is the following:
- Make sure there are no other JS errors before you attempt to close the RadWindow. They can stop the scripts execution and still be the cause of the problem.
- Remove the AjaxSetting where the window manager updates itself. It is not a postback control and such a setting adds unnecessary update panels. I advise you review the following article on using a RadWindow with AJAX: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/how-to/how-to-use-radwindow-with-ajax.
- Avoid using the global scope variable ("window") as a variable name in your scripts. Replace it with something like "wnd" or "rw" or whatever fits your coding style and preferences.
- If you are registering the script call that closes the RadWindow from the server, use the Sys.Application.Load event, as shown here.
- If you are attempting to close a RadWindow with DestroyOnClose==true, add a timeout, as shown here.
- If you still cannot resolve the issue, open a support ticket and send us a sample that we can run and debug the problem so we can look into it.
Regards,
Marin BratanovTelerik by Progress
Hi, Marin,
The hierarchy is: the "locate.aspx" page is the main page. It opens the "CheckOut.aspx" page from the "BtnSellPart" image button. I'm not using ajax per se; I am using the "OnClientClick" event of buttons calling javascript on the page.
Hi Dan,
The BtnSellPart does not have an OnClientClick handler and there is no JS function in Locate.aspx that opens a RadWindow.
Also, see line 89 of Checkout.aspx in the sample I am attaching, it had an unclosed <tr> tag which causes invalid markup. I have also added the proper way to get the RadWindow reference that is shown in the first article I linked (lines 25, 58, 65). I also moved the script manager to the beginning of the form where it belongs in WebForms.
I advise that you compare my sample with your project and migrate the working code so you can start using it.
Regards,
Telerik by Progress