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

GetRadWindow().Close() cause unspecified error

3 Answers 323 Views
Window
This is a migrated thread and some comments may be shown as answers.
Hanoch Faran
Top achievements
Rank 1
Hanoch Faran asked on 26 Feb 2009, 11:56 AM
Hello sir

I have this section in my aspx page:

<telerik:RadWindowManager ID="RadWindowManager3" runat="server" DestroyOnClose="true">
 <Windows>
 <telerik:RadWindow ID="wndStatus" runat="server" Width="750px" Height="550" Skin="Vista"
    Behavior="Move,Close,Resize" Title="הודעת מערכת" Modal="true" DestroyOnClose="true"
    KeepInScreenBounds="true" ReloadOnShow="true" VisibleStatusBar="false">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>

When the window opens, it has a click event which does the following:

<script type="text/javascript">
function CloseAndRebind(rebind)
{
    GetRadWindow().Close();   
}   
           
function GetRadWindow()   
{
    var oWindow = null;   
    if (window.radWindow)
        oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog   
    else if (window.frameElement.radWindow)
        oWindow = window.frameElement.radWindow;//IE (and Moz az well)   
    return oWindow;   
}
</script>

The problem:
When I click the button, the command   GetRadWindow().Close();   bring this message:
A Runtime Error has occurred.
Line 5959 Error: Unspecified error.


In development mode, the debugger goes to ScriptResource.axd and stop at the following line:

Var offsetl = w.screenleft – top.screenleft – top.document.documentElement.scrollleft + 2;

 
Can you help me?

Hanoch

3 Answers, 1 is accepted

Sort by
0
Hanoch Faran
Top achievements
Rank 1
answered on 26 Feb 2009, 12:57 PM
I wanted to add some words:

1)  The error happens only on my client's site and in his VS-2008 studio development tool!
When I run the project on my VS-2005 it works fine.

We both have the same version of Telerik RadControls for ASP.NET Ajax:
Version 2008.3.1105.20

2) The problem doesn't occur if I change DestroyOnClose="true" to DestroyOnClose="false"
But I can't work that way because the window opening doesn't behave smoothly.

Hanoch

0
Georgi Tunev
Telerik team
answered on 26 Feb 2009, 02:27 PM
Hi Hanoch,

The code looks fine and should not be the reason for this problem. To be able to help however, we need to have a better view over your exact setup and project logic. Please open a new support ticket and send us your project so we can examine it more closely.



Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Hanoch Faran
Top achievements
Rank 1
answered on 02 Mar 2009, 10:48 PM
I managed to solve the problem in a strange way.

Just before the statement causing the bug:
  GetRadWindow().Close();

I added another line:
  GetRadWindow().Hide();

This way, the error in ScriptResource.axd doesn't occur anymore.

Tags
Window
Asked by
Hanoch Faran
Top achievements
Rank 1
Answers by
Hanoch Faran
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or