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

Problems returning from a custom dialog that is a frameset

1 Answer 47 Views
Editor
This is a migrated thread and some comments may be shown as answers.
woaksie
Top achievements
Rank 2
woaksie asked on 30 Sep 2009, 05:37 PM
I am trying to create a custom dialog. I first tried the example given here

http://demos.telerik.com/aspnet-ajax/editor/examples/customdialogs/defaultcs.aspx

and I got it working.

Then I swapped in my own aspx page and tried to hook it up in the same way. My aspx page is a frameset with 2 frames. The "submit" button is on the first frame. On this page I added the javascript to close the dialog and return a value. This is not working and the dialog stays open.

I traced the problem to the javascript function getRadWindow().

function getRadWindow()
  {
    if (window.radWindow)
    {
        return window.radWindow;
    }
    if (window.frameElement && window.frameElement.radWindow)
    {
        return window.frameElement.radWindow;
    }
    return null;
  }

It is returning null as both if statements resolve to false. I have dug around with Firebug to see if I can find a way to get the Rad Window but to no avail. Any ideas on how can I get this function to work when it is called in a frame in the dialog?

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 05 Oct 2009, 03:22 PM
Hi Woaksie,

You should replace every window object instance with window.parent. For example use window.parent.radWindow instead of window.radWindow.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
woaksie
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Share this question
or