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

[Solved] Closing Modal Window after maximizing

0 Answers 77 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bob
Top achievements
Rank 1
Bob asked on 26 May 2011, 05:29 PM
When I maximize a modal window, then close it, my browser closes! If I don't maximize the window first, closing it works as it should.
My view:
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.Telerik().Window()
               .Name("Window")
               .Title("test window")
               .Draggable(true)
               .Scrollable(true)
               .Width(500)
               .Height(180)
               .Visible(false)
               .Modal(true)
               .Resizable(resizing => resizing
                   .Enabled(true)
                   .MinHeight(100)
                   .MinWidth(100)
                   .MaxHeight(800)
                   .MaxWidth(800)
                   )
               .Buttons(b => b.Maximize().Close())
               .Content(() =>
               {%>
                    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="865" height="609" ID="Captivate1">
                        <param name="movie" value="<%= ResolveUrl("~/Content/EnterLobbyingActivity_demo_skin.swf") %>"/>
                        <param name="quality" value="high"/>
                        <param name="loop" value="0"/>
                        <embed src="<%= ResolveUrl("~/Content/EnterLobbyingActivity_demo_skin.swf") %>" width="865" height="609" loop="0" quality="high" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed>
                    </object>
               <%})
               .Render();
    %>
    <input id="button1" type="button" onclick="closeCreateWindow()" value="Show"/>
  
    <script type="text/javascript">
        function closeCreateWindow() {
            var window = $('#Window');
            window.css({
                left: $('#button1').offset().left,
                top: $('#button1').offset().top + 32
            });
            window.data('tWindow').open();
        }
    </script>
  
</asp:Content>
Any ideas?
Tags
Window
Asked by
Bob
Top achievements
Rank 1
Share this question
or