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

Prompt over Modal

2 Answers 32 Views
Window
This is a migrated thread and some comments may be shown as answers.
RDavis
Top achievements
Rank 1
RDavis asked on 18 Sep 2008, 07:42 AM

I am trying to open up a RADWindow prompt from inside of a RADWindow modal, but it comes up behind the modal and can't be accessed.  I am using the following javascript code to open the prompt:

    <script type="text/javascript" language="javascript">  
        function GetRadWindow()  
        {  
         var oWindow = null;  
         if (window.radWindow)  
            oWindow = window.radWindow;       
         else if (window.frameElement.radWindow)  
           oWindow = window.frameElement.radWindow;     
         return oWindow;  
        }  
    </script> 

  GetRadWindow().BrowserWindow.radprompt(
'prompt', callBackfnc, 250, 100, null,'Title''defValue'); 

How can I make the model the owner of the prompt so that it appears over it?


Thanks,
--Richard

2 Answers, 1 is accepted

Sort by
0
Accepted
Svetlina Anati
Telerik team
answered on 23 Sep 2008, 07:31 AM
Hello RDavis,

In order to get the desired behavior you should call the radprompt with a little timeout, actually a time interval of 0 ms will do the trick. This being said, you should modify your code in the following manner:

 setTimeout(function(){ GetRadWindow().BrowserWindow.radprompt('prompt', callBackfnc, 250, 100, null,'Title''defValue');}, 0); 

For your convenience I attached a sample demo project.

Greetings,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
RDavis
Top achievements
Rank 1
answered on 24 Sep 2008, 01:53 PM
Thanks Svetlina
Tags
Window
Asked by
RDavis
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
RDavis
Top achievements
Rank 1
Share this question
or