Modal Window doesn't render target page in firefox

6 posts, 0 answers
  1. isaac
    isaac avatar
    4 posts
    Member since:
    Jun 2009

    Posted 31 Aug 2009 Link to this post

    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.
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 01 Sep 2009 Link to this post

    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.
  3. isaac
    isaac avatar
    4 posts
    Member since:
    Jun 2009

    Posted 01 Sep 2009 Link to this post

    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.
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 02 Sep 2009 Link to this post

    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.
  5. isaac
    isaac avatar
    4 posts
    Member since:
    Jun 2009

    Posted 03 Sep 2009 Link to this post

    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.
  6. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 04 Sep 2009 Link to this post

    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.
Back to Top