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

Second Modal Window

4 Answers 218 Views
Window
This is a migrated thread and some comments may be shown as answers.
FierceMuppet
Top achievements
Rank 1
FierceMuppet asked on 28 Aug 2008, 03:10 PM
In my page, I open a modal radWindow.  I then open another modal radWindow from the same parent page, while the 1st modal window is open.  The problem is that the first window can still be clicked and set to the active window.  I could hide and show the other window, but I would rather just have the first window grayed out.

Any ideas?

4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 29 Aug 2008, 06:56 AM
Hello FierceMuppet,

I don't know how exactly you open the second RadWindow, but I suggest to call its setActive() method with a timeout after showing it - a timeout of 0ms should do the trick.
e.g.
window.setTimeout(function()
 {
   oWnd.setActive(true);
 }, 0);


If you still experience problems, please provide more details about your exact setup.



All the best,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Steve
Top achievements
Rank 2
answered on 19 Jan 2009, 09:16 PM
I'm having the same problem (btw, this did not happen in version 2007.3.1314.35).  The "setActive" call does successfully bring the second window to front, but the first window is still clickable; which pretty much means the second window is not modal (even though the "isModal" property is "true").

In my scenario, I have a RadWindowManager on a master page.  The WindowManager has Modal=true so all windows opened with it should be opened as modal dialogs.  I'm using the RadWindowManager's "open" method to open the window.  The second window is opened from the first window by getting the window's RadWindowManager (on the master) and using the "open" method.  Right after opening is where I placed the "setActive(true)" call.

Thoughts?
0
Steve
Top achievements
Rank 2
answered on 19 Jan 2009, 09:50 PM
A little more info...

This is truly strange.  I have found one thing that works: the text of an "a href".  This tag loads the second window and correctly makes it modal:
<a onclick="ShowRadWindow('RadWindowForm.aspx');" href="#">
    <img style="border:0px" alt="" src="AddRecord.gif" /> Add New Record
</a>

The weird thing is, even though both the <img> tag and the static "Add New Record text are both inside the "a href", ONLY CLICKING ON "Add New Record" loads the popup modal.  If you click on the image, it loads but leaves the first window clickable.

In addition, I've tried just having an <img> tag with an "onclick" attribute, <asp:Button> with "OnClientClick", <input type="image"> with "onclick" attribute...none of these load the second in a modal fashion.  What is that all about?
0
Fiko
Telerik team
answered on 21 Jan 2009, 08:59 AM
Hello Steve,
 
Please make sure that you are using a recent version of the control - I see that you are using one from July last year.
The behavior of the control is improved in the following updates and now you can solve the problem by calling  oWnd2.setActive(true) function for the second modal RadWindow object. The function ShowRadWindow() should look like this :

function ShowRadWindow(url) 
    var oManager = GetRadWindow().get_windowManager(); 
    var oWnd2 = oManager.open(url, "RadWindow2"); 
    oWnd2.setActive(true); 
     
    return false



Kind regards,
Fiko
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
FierceMuppet
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Steve
Top achievements
Rank 2
Fiko
Telerik team
Share this question
or