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

[Solved] Two Modal Rad Windows at same time

5 Answers 199 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sarabjeet Singh
Top achievements
Rank 1
Sarabjeet Singh asked on 16 Nov 2009, 07:06 AM
Hi,

I am facing problem in using Modal Rad-Window.
The scenario is, that i am having a base page, from which a pop-up opens.
From this pop-up, i need to open another pop-up.

What is required is that, the first pop-up should be modal. (That works fine).
Second pop-up when opens, should disable the first pop-up, and should be able to return value to the first pop-up, from which it was opened.

The problem i am facing is, i am not able to create 2nd modal pop-up. It does not disable first pop-up which I opened.

Thanks
Regards
Sarabjeet Singh Marwah

5 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 16 Nov 2009, 08:45 AM
Hello Sarabjeet,

When you create frames, you also create a frame tree (RadWindow is basically an IFRAME). Each frame is loaded inside another frame or inside the top window. That being said at the top of the frame tree there's always the window in which the frames are opened and JavaScript calls this frame top. In this way you can open a window from your first modal window and the new one will belong to your browser window.

In order to achieve the desired behavior, you should open the second window in the browser's context. You can achieve this functionality in two ways:

1) By referencing the browser window form your RadWindow and then open the new RadWindow.
2) By using the top keyword, as mentioned above.

In both cases you should open the second window with a little timeout in order to make it active and not shown behind the first RadWindow. Actually, a time interval, equal to 0 will also do the trick.

I prepared for you a sample demo which shows the first approach. You can find more information about frames here.
http://www.quirksmode.org/js/frameintro.html

I hope that this is helpful. Let me know if you need further assistance.



All the best,
Svetlina
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.
0
Sarabjeet Singh
Top achievements
Rank 1
answered on 16 Nov 2009, 09:11 AM
Hi Svetlina,

Thanks for your suggestion, but it differs from my scenario.
In my scenario I have a base page, from which I opened a modal poup window. From this modal window, i require to open another modal pop-up window.

But in your solution, you are opening both the windows from the same base page.

Please let me know how can I disable First pop-up window when I open second pop-up window from first pop-up window.


Thanks
Regards
Sarabjeet Singh Marwah

0
Svetlina Anati
Telerik team
answered on 16 Nov 2009, 11:24 AM
Hello Sarabjeet Singh,

If you want to open the second RadWindow in the context of the first one and not in the main browser window's content you should put another RadWindow/RadWindowManager in the first RadWindow's content page and open the second RadWindow as you have done for the main page.

Sincerely yours,
Svetlina
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.
0
Sarabjeet Singh
Top achievements
Rank 1
answered on 16 Nov 2009, 11:40 AM
Hi Svetlina ,

I tried the approach you mentioned in your reply.
But, still there is problem.
1. I have close button on the rad Window, at both level, 1 and 2.
2. If i open 2nd window in first rad window, and say the size of second window is more than the size of first window, it will generate scroll bars on the 1st window, which gives a look of child window on 1st window, which is not desired. What is desired is, that the window opened, whould give look and fell of being child window of the browser window itself.
3. As we need interaction between, opener and child windows, so, if we have window, till nth level, we should be able to get its respective parent, in this case, Pop-up 2 should get reference of PopUp 1, with a look and feel as being child of browser window, disableing all the content on the page, including 1st RadWindow.

Regards
Sarabjeet Singh Marwah
0
Svetlina Anati
Telerik team
answered on 19 Nov 2009, 09:23 AM
Hello Sarabjeet,

Would you please praepare a sample, fully runnable reproduction demo which reproduces the issue, uses the logic of opening and closing the RadWindows but only with simple content, widthout complex custom logic implemeneted? Once you do this, please share the code here along with detailed explanations which page is the main one, which are the content pages and detailed reproduction instructions. Attach also a screenshot with the problem clearly marked on it.

Once I receive this information I will build up a reproduction setup and I will do my best to help.


All the best,
Svetlina
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
Window
Asked by
Sarabjeet Singh
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Sarabjeet Singh
Top achievements
Rank 1
Share this question
or