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

top.radopen doesn't work

1 Answer 96 Views
Window
This is a migrated thread and some comments may be shown as answers.
SSirica
Top achievements
Rank 3
Iron
Iron
Iron
SSirica asked on 06 Jan 2011, 09:32 PM

I'm using VS2010 .Net 4.0 and VB.  I downloaded a small project I found on here that is supposed to demonstrate how to launch a radWindow so that it doesn't get stuck in the opening frame.  It was called Frameset.zip.  It was in C# but since there wasn't any server code converting it to VB was no big deal.  Bottom line is it doesn't work.  Every time I push the button to launch the radWindow I get the error:
    Microsoft JScript runtime error: Object doesn't support this property or method
on the line:
    top.radopen("http://www.google.com", "RadWindow1")

If I move:
    <telerik:RadScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release" /> 
    <telerik:RadWindowManager Modal="true" ID="Singleton" runat="server"> 
    </telerik:RadWindowManager>
to frame1.aspx and change it to use window.radopen, the radWindow launches fine but it's stuck in the frame. 

Here are my pages:
Default.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
  
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<frameset border="0" cols="200,*" frameborder="0">
    <body>
        <telerik:RadScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release" />
        <telerik:RadWindowManager Modal="true" ID="Singleton" runat="server">
        </telerik:RadWindowManager>
        <frame name="contents" src="Frame1.aspx">
        <frame name="main" src="Frame2.aspx">
    </body>
</frameset>
</body>
</html>

Frame1.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Frame1.aspx.vb" Inherits="Frame1" %>
  
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <script type="text/javascript">
        function OpenWin() {
            top.radopen("http://www.google.com", "RadWindow1");
        }
      
    </script>
    <input type="button" onclick="OpenWin()" value="Open RadWindow" />
    </div>
  
    </form>
</body>
</html>

frame2.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Frame2.aspx.vb" Inherits="Frame2" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    Frame 2
    </div>
    </form>
</body>
</html>

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 07 Jan 2011, 08:43 AM
Hi SSirica,

I believe that the sample that you have found was for RadWindow for ASP.NET (1.x), am I right?
Basically, there shouldn't be anything else in the frameset page, apart from the frameset itself. In ASP.NET 1.x / 2.0, it was possible to put a server control in the frameset page and to work with it. That is why it was possible to put a RadWindowManager in it and when the RadWindow was shown, it would have been displayed over the frameset.

ASP.NET AJAX however is much more "strict" regarding this issue and the framework does not recognize any other controls in the frameset page - that is why the scenario is not working with RadWindow for ASP.NET AJAX. This is a general framework issue and is not related to the RadWindow control - you will experience the same problem with any other standard control.

The only workaround that may be applied in this case (i.e. when using the ASP.NET AJAX framework) is to use another page that would contain the frameset page in an IFRAME. This way you can have the RadWindowManager in this topmost page, along with an IFRAME (with width and height set to 100%) that loads the frameset page. On the other hand, such setup would make the project logic much more complex, so I would not recommend it.

Regards,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Window
Asked by
SSirica
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Georgi Tunev
Telerik team
Share this question
or