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

Modal Window doesn't render target page in firefox

5 Answers 76 Views
Window
This is a migrated thread and some comments may be shown as answers.
isaac
Top achievements
Rank 1
isaac asked on 31 Aug 2009, 06:26 PM
Hi, I've created a rad window to use as a modal pop up to stop the user from clicking on controls until some processing has finished. It works as expected in Internet Explorer 7, But in Firefox 3.5.2 the target page isn't rendered. The modal window shows up, but without any content. Also, in Google Chrome 2.0.172.43 the modal window doesn't even show except for a white rectangle with no skinning or content. This is how I'm creating the modal window.

<script type="text/javascript">
function ShowProcessingDialog(){
window.radopen("ProcessingPage.aspx", "modalWindow");
}
function ShowAnotherProcessingDialog(){
window.radopen("AnotherProcessingPage.aspx", "modalWindow");
}
</script>

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
            <Windows>
                <telerik:RadWindow ID="modalWindow" runat="server" Behaviors="None" Height="115px"
                    Width="450px" InitialBehaviors="None" Modal="true" VisibleStatusbar="false" VisibleTitlebar="false" 
    Skin="Office2007">
         </telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>

    <table align="center">
        <tr>
            <td align="left">
                <asp:Button ID="btnProcess1" runat="server" Text="Process" UseSubmitBehavior="true"
                    CssClass="button" OnClick="ProcessSomething" OnClientClick="javascript:return ShowProcessingDialog();" />
            </td>
            <td align="left">
                <asp:Button ID="btnProcess2" runat="server" Text="Process Again" UseSubmitBehavior="true"
                    CssClass="button" OnClick="ProcessSomethingElse" OnClientClick="javascript:return ShowAnotherProcessingDialog();" />
            </td>
        </tr>
    </table>

Any help would be greatly appreciated.

5 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 01 Sep 2009, 08:23 AM
Hi isaac,

Try setting the OnClientClick event handler like this:
OnClientClick="ShowProcessingDialog(); return false;"
OnClientClick="ShowAnotherProcessingDialog(); return false;"

The idea is to cancel the postback. If you don't do that, the JavaScript will be fired and the RadWindow will be shown, but right after that the postback will occur and the RadWindow object will be destroyed - just like any other dynamically added object on that page.

Kind regards,
Georgi Tunev
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
isaac
Top achievements
Rank 1
answered on 01 Sep 2009, 01:05 PM
Ok, that fixes the problem with the content not showing up. Now I have another problem. I was relying on the postback to call the code behind and when the postback finished destroy the rad modal window so that control can be given back to the user. Now the rad modal window stays open all the time and the code behind never gets called.
0
Georgi Tunev
Telerik team
answered on 02 Sep 2009, 05:10 AM
Hi Isaac,

For such scenario I would recommend to use RadAjaxLoadingPanel instead. It is specially designed for scenarios like the one that you try to implement.


All the best,
Georgi Tunev
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
isaac
Top achievements
Rank 1
answered on 03 Sep 2009, 02:08 PM
Could you point me to a good example of using the RadAjaxLoadingPanel? The examples I've found don't quite do what I want. Thanks.
0
Georgi Tunev
Telerik team
answered on 04 Sep 2009, 01:52 PM
Hello Isaac,

I attached a small sample that shows the approach I was talking about - I hope it will be of help. You could style the RadAjaxLoadingPanel further so it matches your requirements.


Kind regards,
Georgi Tunev
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
isaac
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
isaac
Top achievements
Rank 1
Share this question
or