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

[Solved] Modal window behind caller window

2 Answers 130 Views
Window
This is a migrated thread and some comments may be shown as answers.
Alex Dybenko
Top achievements
Rank 2
Alex Dybenko asked on 06 May 2008, 04:10 PM
Hi,
in this sample:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Window/Examples/CommunicationBetweenRadWindows/DefaultCS.aspx

if you replace Choose city button with image input like:

<

input type="image" src="SomeImage.gif" onclick="openWin2(); return false;"/>

then modal window get opened behind first one. Any workaround for this?

Thanks
Alex

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 09 May 2008, 11:19 AM
Hi Alex,

This is behavior is related to the browser itself. You can easily fix this problem by opening the RadWindow with a small timeout - even a 0ms one will do the trick:

function openWin2() 
    var parentPage = GetRadWindow().BrowserWindow; 
    var parentRadWindowManager = parentPage.GetRadWindowManager(); 
    window.setTimeout(function() 
    { 
    var oWnd2 = parentRadWindowManager.open("Dialog2.aspx","RadWindow2"); 
    oWnd2.setSize(300,150); 
    },0); 
 


Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Alex Dybenko
Top achievements
Rank 2
answered on 13 May 2008, 11:24 AM
Thanks Georgi,
this works!

Alex
Tags
Window
Asked by
Alex Dybenko
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
Alex Dybenko
Top achievements
Rank 2
Share this question
or