Results 1 to 2 of 2

Thread: [RESOLVED] Modal Popup Drag/Drop

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618

    Resolved [RESOLVED] Modal Popup Drag/Drop

    SO I created a Panel to use to drag my modal popup, but any movement of it when you release the mouse it returns back to it's original position. ANy idea what causes this behavior and how to stop it? Using Master Pages, but staying inside the content area.

    Code:
                          <asp:Panel ID="pnlOwner" CssClass="pnlBackGround" runat="server" Width="450px">
                              <asp:Panel ID="pnlOwnerDrag" runat="server"><b>Select Endorsements:</b>  </asp:Panel>                                              
                              <div id="divOwner" style="height: 250px; overflow: auto;">
                                  <asp:CheckBoxList ID="cblOwnerEndorsementsPop" runat="server"></asp:CheckBoxList>
                              </div>
                              <br />  
                              <asp:Button ID="btnOwnerOk" runat="server" Text="OK" UseSubmitBehavior="False" CausesValidation="false" />
                              <asp:Button ID="btnOwnerHackOk" runat="server" Text="OK" Style="display: none" />
                              <asp:Button ID="btnOwnerCancel" runat="server" Text="Cancel" UseSubmitBehavior="False" />
    
                          </asp:Panel>
                          <asp:ModalPopupExtender ID="mpeOwner" runat="server"
                              PopupControlID="pnlOwner"
                              TargetControlID="btnOwnerHack"                           
                              BackgroundCssClass="modalBackground"
                              DropShadow="True"
                              OkControlID="btnOwnerHackOk"
                              CancelControlID="btnOwnerCancel"
                              PopupDragHandleControlID="pnlOwnerDrag"
                              Enabled="True">
                          </asp:ModalPopupExtender>
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618

    Re: Modal Popup Drag/Drop

    This javascript in the page_load resolved it:

    Code:
    function setBodyHeightToContentHeight() {
                document.body.style.height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) + "px";
            }
            setBodyHeightToContentHeight();
            $addHandler(window, "resize", setBodyHeightToContentHeight);
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width